[jdom-interest] (no subject)

Daniel_TAYE at COFACE.COM Daniel_TAYE at COFACE.COM
Thu Oct 31 03:08:23 PST 2002


I tried this piece of code to validate a JDOM tree against a schema.Unless
I put The xsi: attributes in the original xml ,I get
declaration Not Found exceptionon the root element.I have
xerces2,Jdom8.Anything wrong with it?

SAXBuilder builder = new SAXBuilder("org.apache.xerces.parsers.SAXParser",
true);

          builder.setFeature
("http://apache.org/xml/features/validation/schema", true);
          builder.setProperty
("http://apache.org/xml/properties/schema/external-noNamespaceSchemaLocation",

"myshema.xsd");


          try {
               Document doc = builder.build(new InputStreamReader(input));
               System.out.println("doc : "  + doc);

          } catch (Exception ie){
               ie.printStackTrace();
          }

Thank you for any help.

--------------------------------------------------------------------------
Pour  sécuriser  le commerce inter-entreprises, traditionnel ou sur le web,
le  Groupe  Coface  propose  @rating,  premier  système mondial de notation
d'entreprises accessible sur Internet au http://www.cofacerating.com

In   order   to   make   e-commerce   or  traditional  business-to-business
transactions  safe,  the  Coface  Group offers @rating, the first insurable
business rating on the web at http://www.cofacerating.com





More information about the jdom-interest mailing list