OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
Re: [xml-dev] Nested Documents (was: XML 2.0)


Johnson, Matthew C. (LNG-ALB) a écrit :
> Using today’s parsers I can’t parse the following as a single 
> stream/file/etc.
> <person>
>   <name>Matt Johnson</name>
> </person>
> <person>
>   <name>Michael Kay</name>
> </person>

Several years ago I was using a third-party tool that was feeding my 
application with (sometimes) mutli-rooted documents (finally, it's 
almost the same issue than Michael Kay with its log files)

I introduced an option for addressing it in RefleX : you can ask for the 
"lax" or "strict" mode (the latter is naturally the default).

With mode="lax", XML fragments and well-formed XML documents will be 
parsed sucessfully ; this include fragments that doesn't contain a root 
element at all : you can also have only text or even text around root 
elements. Would it be also a new feature in XML 2.0 ?

It works for DOM and SAX.

In this example :
several documents are parsed and each fragment are merged in a new 
well-formed XML document.
Note : the target well-formed document can be a SAX document even if you 
parsed the fragments à la DOM : the engine will "cast" them automatically.


              (. .)
|      Philippe Poulard       |
        Have the RefleX !

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS