![]() ![]() ![]() ![]() ![]() ![]() ![]() |
![]() | |
![]() |
|
||||||||||
About com.ms.xml.parserYou should not have to use this package directly unless you really know what you are doing and the XML Object Model doesn't provide what you need already. The most important class in this package is the XML Parser itself which can be invoked as follows: import com.ms.xml.parser; Parser p = new Parser(); ElementFactoryImpl f = new ElementFactoryImpl(); Document d = new Document(f); p.parse( new URL("http://www.foo.com/test.xml"), f, d.getDTD(), d, true); The parser will then call the element factory to create all the nodes in the tree which it will add to the document as it goes. The parser will also automatically load any external DTD's and external entities that are needed. The parser will then hold onto these DTD's until you call clear on the Document. The DTD elements are stored internally in the DTD object as ElementDecl, Entity, AttDef, ContentModel, and Notation objects. These are not intended for public use. Instead the DTD information can be accessed through the regular XML Object Model using the Document findEntity and getElementDecl methods. |
![]() |
© 1997 Microsoft Corporation. All rights reserved. Terms of use. |