由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
XML版 - [转载] Re: May a XML file have more than one root?
相关主题
XML schema questionsQuestion!!!
在Excel中如何使用XML?schema 开发工具有那些??
XML, Database and JavaDTD parser
one simple questionXML resource
[转载] question on XML parser10-15
用于 parse xml的script16-20
请各位看看,他们是不是很难呢?A common language and its risks
[转载] XML parsing problemXML 教程--8
相关话题的讨论汇总
话题: xml话题: element话题: root话题: dtd话题: parser
进入XML版参与讨论
1 (共1页)
w*****h
发帖数: 28
1
【 以下文字转载自 Java 讨论区 】
【 原文由 gas 所发表 】
no
w*****h
发帖数: 28
2
【 以下文字转载自 Java 讨论区 】
【 原文由 sui 所发表 】
Why not?

w*****h
发帖数: 28
3
【 以下文字转载自 Java 讨论区 】
【 原文由 txvoilet 所发表 】
If a XML's DTD has two roots, but the XML just has one root.
Is the XML valid?
Another one question, who know which parser can deal with
the XML with more
than one root? How about Oracle parser?
w*****h
发帖数: 28
4
【 以下文字转载自 Java 讨论区 】
【 原文由 zinczinc 所发表 】
Please read the XML1.0 spec. One root per document is for
well-formed or valid XML document. But you can always write
ill-formed ones.
w*****h
发帖数: 28
5
【 以下文字转载自 Java 讨论区 】
【 原文由 txvoilet 所发表 】
Can Oracle XML parser deal with ill-formed XML?
w*****h
发帖数: 28
6
【 以下文字转载自 Java 讨论区 】
【 原文由 gas 所发表 】
yes
It is not XML and you should not suppose xml parser to do so.
w*****h
发帖数: 28
7
【 以下文字转载自 Java 讨论区 】
【 原文由 txvoilet 所发表 】
It is not XML? what is it then?
You said above that XML can have one root and its DTD has
tow roots.
That means a XML need not obey its DTD strictly?For example,
Here is a DTD file:







w*****h
发帖数: 28
8
【 以下文字转载自 Java 讨论区 】
【 原文由 txvoilet 所发表 】
It is not XML? what is it then?
You said above that XML can have one root and its DTD has
tow roots.
That means a XML need not obey its DTD strictly?For example,
Here is a DTD file:







w*****h
发帖数: 28
9
【 以下文字转载自 Java 讨论区 】
【 原文由 gas 所发表 】
bad-formed XML or non-XML markup language
sure
w*****h
发帖数: 28
10
【 以下文字转载自 Java 讨论区 】
【 原文由 wendywh 所发表 】
XML can have several roots.
But it's hard to find a XML parser to deal with that.
As to the Oracle parser, you can check getDocumentElement(), it will
allows direct access to the child node that is the root element of
the document.But the return value is just Element. So it means that you cannnot
return a list of root elements.
I have not find any parser can return a list of root elements.
w*****h
发帖数: 28
11
【 以下文字转载自 Java 讨论区 】
【 原文由 xt 所发表 】
I think our house parser can deal with that, but it will
parse the file into more than 1 message.
b***k
发帖数: 77
12

It's wrong according to the specification.
That should be called XML fragment.
All you have to do is create a root yourself. something like:

&data;

you define your data as entity reference.
It's because there is only one root for every xml document.

【在 w*****h 的大作中提到】
: 【 以下文字转载自 Java 讨论区 】
: 【 原文由 xt 所发表 】
: I think our house parser can deal with that, but it will
: parse the file into more than 1 message.

1 (共1页)
进入XML版参与讨论
相关主题
XML 教程--8[转载] question on XML parser
XML 教程--10用于 parse xml的script
what is the difference between XML and XSL请各位看看,他们是不是很难呢?
A very simple question from XML beginner, Thank you[转载] XML parsing problem
XML schema questionsQuestion!!!
在Excel中如何使用XML?schema 开发工具有那些??
XML, Database and JavaDTD parser
one simple questionXML resource
相关话题的讨论汇总
话题: xml话题: element话题: root话题: dtd话题: parser