i*****t 发帖数: 220 | 1 what is the function of xml parser? just to validate wheather an xml file is
valid or not? what do we need to parse an xml file? do we need: xml file and
its DLD/schema? thanks. | e***c 发帖数: 68 | 2 Parser: SAX Parser->Event Drive
So you define the process when those element, space, attribute, etc happens.
DOM Parser->Node, easy for reading and writing.
So if you want to get the element from XML, if just once, SAX is fine. If you
want to modify it, maybe DOM is better, but it require more memory.
Check www.apache.org for detail.
DTD/schema defines the data type you defined in XML file. It confines the formate
t of XML file.
For parsers, xalan->parser+transformation
Xerecs->parser+schema+...
【在 i*****t 的大作中提到】 : what is the function of xml parser? just to validate wheather an xml file is : valid or not? what do we need to parse an xml file? do we need: xml file and : its DLD/schema? thanks.
| g****y 发帖数: 141 | 3
you
i am afraid in this case DOM is the only choice bah
formate
is
file and
【在 e***c 的大作中提到】 : Parser: SAX Parser->Event Drive : So you define the process when those element, space, attribute, etc happens. : DOM Parser->Node, easy for reading and writing. : So if you want to get the element from XML, if just once, SAX is fine. If you : want to modify it, maybe DOM is better, but it require more memory. : Check www.apache.org for detail. : DTD/schema defines the data type you defined in XML file. It confines the formate : t of XML file. : For parsers, xalan->parser+transformation : Xerecs->parser+schema+...
| i*****t 发帖数: 220 | 4 Thanks... but why DOM parser is the only choice here? May I use a DOM parser
to generate an XML file? Thanks.
happens.
file
xml
【在 g****y 的大作中提到】 : : you : i am afraid in this case DOM is the only choice bah : formate : is : file and
| s***e 发帖数: 28 | 5
^^^^^^^^^^^^^^^^^^^^^^
^^^^^^^^^^^^^^^^^^^^^^^..yes..
更严格的说应该是你可以利用目前的DOM APIs来generate XML files..
such as JAXP, Xerces, or JDOM...
【在 i*****t 的大作中提到】 : Thanks... but why DOM parser is the only choice here? May I use a DOM parser : to generate an XML file? Thanks. : : happens. : file : xml
| g****y 发帖数: 141 | 6 SAX is read only
【在 i*****t 的大作中提到】 : Thanks... but why DOM parser is the only choice here? May I use a DOM parser : to generate an XML file? Thanks. : : happens. : file : xml
|
|