Posted By:
Scott_Allan
Posted On:
Friday, March 28, 2003 05:14 PM
The program does not seem able to locate the .xsd document. I'm sure it has something to do with the fact that it is processing inside the ejb container. I am using the Application Client to read a server side XML file and converting to a String since I was not able to access the file from the session bean. Please tell me the best way to make the xml schema file available. XMLReader xr = new org.apache.xerces.parsers.SAXParser(); xr.setFeature("http://xml.org/sax/features/validation",true); xr.setFeature("http://apache.org/xml/features/validation/schema",true); xr.setFeature("http://apache.org/xml/features/validation/schema-full-checking"
More>>
The program does not seem able to locate the .xsd document.
I'm sure it has something to do with the fact that it is processing inside the ejb container. I am using the Application Client to read a server side XML file and converting to a String since I was not able to access the file from the session bean. Please tell me the best way to make the xml schema file available.
XMLReader xr = new org.apache.xerces.parsers.SAXParser();
xr.setFeature("http://xml.org/sax/features/validation",true);
xr.setFeature("http://apache.org/xml/features/validation/schema",true);
xr.setFeature("http://apache.org/xml/features/validation/schema-full-checking",true);
xr.setProperty("http://apache.org/xml/properties/schema/external-schemaLocation",
"d:\transactions.xsd";
xr.setContentHandler(this);
xr.setErrorHandler(this);
StringReader r = new StringReader(xmlString);
xr.parse(new InputSource(r));
<<Less