xml schema question
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Anonymous
Posted On:   Friday, March 26, 2004 02:06 PM

Hello I have two simple questions . Below is the beginning of my xml doc, I have to parse in my java program. First I want to know what does the "urn:iana:xml:ns:epp-1.0 epp-1.0.xsd" mean , i mean where is the physical location of in that way declared schema? Second i want to know how to validate this document using dom4j. I wrote a test code: SAXReader reader = new SAXReader(); reader.setValidation(true); try{ reader.setProperty( "xsi:noNamespaceSchemaLocation", "file://c:/schemas/epp-1.0.xsd" ); }catch(SAXException ex){ System.out.println(ex   More>>

Hello
I have two simple questions . Below is the beginning of my xml doc, I have to parse in my java program.







First I want to know what does the "urn:iana:xml:ns:epp-1.0 epp-1.0.xsd" mean , i mean where is the physical location of in that way declared schema?


Second i want to know how to validate this document using dom4j. I wrote a test code:



SAXReader reader = new SAXReader();

reader.setValidation(true);

try{

reader.setProperty(

"xsi:noNamespaceSchemaLocation",

"file://c:/schemas/epp-1.0.xsd"

);

}catch(SAXException ex){

System.out.println(ex.toString());

}

try{

org.dom4j.Document document = reader.read(uri);

}catch(DocumentException ex){

System.out.println(ex.toString());

}



It works and throws a DocumentException saying that schema cannot be find. I think it is caused by the setProperty method but I don't know what should I set as the property.
THe disk location of epp-1.0.xsd (c:schemasepp-1.0.xsd) is correct.



I would be gratefull for every useable hint.
Cheers
Bart

   <<Less
About | Sitemap | Contact