avatar
one simple question# XML - WWW明日之星
B*i
1
带头大哥为事业不肯还俗和叶二娘结婚。
叶二娘浑身罪恶, 却至死保存着对带头大哥的那份爱。
avatar
i*t
2
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.
avatar
e*c
3
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.

avatar
g*y
4

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+...

avatar
i*t
5
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

avatar
s*e
6

^^^^^^^^^^^^^^^^^^^^^^
^^^^^^^^^^^^^^^^^^^^^^^..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

avatar
g*y
7
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

相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。