JAVA/CORBA CLASSES
Parses the contents of an attachment and creates the DOM tree of the XML.
Note This method is new with Release 5.0.3.
Defined in
EmbeddedObject, Item, MIMEEntity
Syntax
public org.w3c.dom.Document parseXML(boolean validate) throws NotesException, java.io.IOException, org.xml.sax.SAXException
Parameters
boolean validate
org.w3c.dom.Document
For standalone applications, you should include the NCSO.jar or Notes.jar file in the classpath for the lotus.domino classes. You should also include the XML4j.jar file in your classpath to use the XML parser, and the LotusXSL.jar file to use the XSL processor.
Note You must include the XML4j.jar file in your classpath even if you only need to use the transformXML methods.
For applets that run in a browser, you should include the XML4j.jar and/or XML4j.cab file with the applet itself, to use the XML parser. To use the XSL processor, you should include the XML4j.jar and/or XML4j.cab file as well as the LotusXSL.jar and/or LotusXSL.cab file with the applet.
Errors generated during parsing are directed to System.err.
If a stream of XML contains relative or partial URLs, the parseXML method or transformXML method resolves the partial URL as a Page on the database where the InputStream originated. For example, when the parseXML or transformXML method encounters the XML stream <!DOCTYPE software-release-note SYSTEM "readme.dtd">, it looks for a Page named "readme.dtd" in the database where the source stream originated.
EmbeddedObject.parseXML creates a temporary file. The file is deleted when EmbeddedObject is recycled.
Note In Release 7.0, this method was enhanced to handle a DTD located at a URL. However, when using a URL, DOMParser.Process() will intermittently fail raising error #4602:"DOM parser operation failed" if the load on the server is too heavy, resulting in a time-out. If this occurs, the calling application will need to try again.
Example See Also