boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
XML版 - [转载] XML parsing problem
相关主题
[转载] XML question
About XML parser
[转载] help! XML parse problem
SAX and DOM parsers
用于 parse xml的script
[转载] a question on XML parser
problem with perl XML::Node module
How to parse DTD structure?
Re: Please help! How to Program to Create an XML document with no root element?
xml parser?
相关话题的讨论汇总
话题: xml话题: parsing话题: domparser话题: element话题: document
进入XML版参与讨论
1 (共1页)
s********t
发帖数: 4150
1
【 以下文字转载自 Java 讨论区,原文如下 】
发信人: SmartAgent (sigh...), 信区: Java
标 题: XML parsing problem
发信站: The unknown SPACE (Tue Jan 2 02:00:05 2001) WWW-POST
Trying to parse XML file with IBM's XML4J, but it just
doesn't work. Any masters to give some advice?
The code:
DOMParser parser = new DOMParser();
parser.parse("index.xml");
Document document = parser.getDocument();
Element doc = (Element)document.getDocumentElement();
...
The XML file: (It doesn't refer to the dtd file as it is,
but it won't work ei
w******r
发帖数: 55
2
what do you mean by "doesn't work"? no output at all? or
some error message?
first to make sure you have some important methods for DOM
parser to parse,
like switch(node.getNodeType){case ....; case ....}
all the handlers are not free lunch -- you gotta make them
yourself.

【在 s********t 的大作中提到】
: 【 以下文字转载自 Java 讨论区,原文如下 】
: 发信人: SmartAgent (sigh...), 信区: Java
: 标 题: XML parsing problem
: 发信站: The unknown SPACE (Tue Jan 2 02:00:05 2001) WWW-POST
: Trying to parse XML file with IBM's XML4J, but it just
: doesn't work. Any masters to give some advice?
: The code:
: DOMParser parser = new DOMParser();
: parser.parse("index.xml");
: Document document = parser.getDocument();

1 (共1页)
进入XML版参与讨论
相关主题
xml parser?
从哪里开始学习XML?
请问那有xml的parse source(bsd 或 lin..... 补充一句
one simple question
where to find some sample code of XML document creating and parsing with JAXP DOM?
Processing xml files
Validity
question on CGI and XML
Re: where to find some sample code of XML document creating and parsing with JAXP DO
挖坑!
相关话题的讨论汇总
话题: xml话题: parsing话题: domparser话题: element话题: document