由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
XML版 - [转载] help! XML parse problem
相关主题
SAX and DOM parsersPerl XML FAQ--2
[转载] XML parsing problemHelp: Several questions on XML
one simple question[转载] PERL XML parser
[转载] XML questionAny APIs for handling XML?
[转载] a question on XML parser用于 parse xml的script
About XML parserProcessing xml files
xml parser?problem with perl XML::Node module
xml parserHow to parse DTD structure?
相关话题的讨论汇总
话题: xml话题: parse话题: dom话题: string
进入XML版参与讨论
1 (共1页)
r**e
发帖数: 57
1
【 以下文字转载自 Java 讨论区,原文如下 】
发信人: rake ( 夜叉王), 信区: Java
标 题: help! XML parse problem
发信站: The unknown SPACE (Wed Apr 2 00:41:20 2003) WWW-POST
需要parse的data是通过jdbc从数据库里query 出来的result (xml 形式的string),
看了看DOM的parse 好像不能用在string上,又什么其他办法?多谢啦。
k***o
发帖数: 1
2
In MS DOM parser, you can use LoadXML to load a xml in a string. I will expect
Java DOM parser should have the same thing...

【在 r**e 的大作中提到】
: 【 以下文字转载自 Java 讨论区,原文如下 】
: 发信人: rake ( 夜叉王), 信区: Java
: 标 题: help! XML parse problem
: 发信站: The unknown SPACE (Wed Apr 2 00:41:20 2003) WWW-POST
: 需要parse的data是通过jdbc从数据库里query 出来的result (xml 形式的string),
: 看了看DOM的parse 好像不能用在string上,又什么其他办法?多谢啦。

w*********n
发帖数: 84
3
Java does have this function to load xml from a string.

【在 k***o 的大作中提到】
: In MS DOM parser, you can use LoadXML to load a xml in a string. I will expect
: Java DOM parser should have the same thing...

m**c
发帖数: 90
4

You can create a InputSource object which contains input string (wrapped
inside StringReader object):
...
StringReader sr = new StringReader(inputStr);
InputSource is = new InputSource(sr);
saxParser.parse(is, xxx); // SAX parser
domParser.parse(is, xxx); // DOM parser
...

【在 r**e 的大作中提到】
: 【 以下文字转载自 Java 讨论区,原文如下 】
: 发信人: rake ( 夜叉王), 信区: Java
: 标 题: help! XML parse problem
: 发信站: The unknown SPACE (Wed Apr 2 00:41:20 2003) WWW-POST
: 需要parse的data是通过jdbc从数据库里query 出来的result (xml 形式的string),
: 看了看DOM的parse 好像不能用在string上,又什么其他办法?多谢啦。

1 (共1页)
进入XML版参与讨论
相关主题
How to parse DTD structure?[转载] a question on XML parser
请问那有xml的parse source(bsd 或 lin..... 补充一句About XML parser
XML 结构xml parser?
XMLSolutions 发布XMLZip.xml parser
SAX and DOM parsersPerl XML FAQ--2
[转载] XML parsing problemHelp: Several questions on XML
one simple question[转载] PERL XML parser
[转载] XML questionAny APIs for handling XML?
相关话题的讨论汇总
话题: xml话题: parse话题: dom话题: string