H s
Fri, 22 Jun 2007 10:50:37 -0700
Thanks a bunch... if I have my xsd file inside a jar how can I specify that ? thanks - Harjit
From: "Edwin Dankert" <[EMAIL PROTECTED]> To: "H s" <[EMAIL PROTECTED]> CC: dom4j-user@lists.sourceforge.net Subject: Re: [dom4j-user] Validating against a schema Date: Fri, 22 Jun 2007 17:36:53 +0100 Please see below, there is more information available in this thread. Regards, Edwin - http://www.edankert.com/ ---------- Forwarded message ---------- From: Edwin Dankert <[EMAIL PROTECTED]> Date: 20-Sep-2005 09:30 Subject: Re: [dom4j-user] In memory validation To: Michael Goodwin Cc: dom4j-user@lists.sourceforge.net Normally you use the underlying parser to perform the validation. You could use for instance something like this to validate against a XML Schema: SAXParserFactory factory = SAXParserFactory.newInstance(); factory.setValidating( true); factory.setNamespaceAware( true); SAXParser parser = factory.newSAXParser();parser.setProperty( "http://java.sun.com/xml/jaxp/properties/schemaLanguage","http://www.w3.org/2001/XMLSchema"); parser.setProperty( "http://java.sun.com/xml/jaxp/properties/schemaSource", "file:test.xsd"); SAXReader reader = new SAXReader( parser.getXMLReader()); Document doc = reader.read( new InputSource( "file:test.xml"));
_________________________________________________________________Picture this share your photos and you could win big! http://www.GETREALPhotoContest.com?ocid=TXT_TAGHM&loc=us
------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/
_______________________________________________ dom4j-user mailing list dom4j-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dom4j-user