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

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: [xml-dev] Question for updating existing XML file

[ Lists Home | Date Index | Thread Index ]

Yes, VTD is not a binary replacement of XML. It is designed to work alongside of XML.
 
Because VTD is entirely based on offset and length, one can literally stick changes into
the XML document with minimum CPU overhead. This is necessary for many XML intermediaries because the cost of taking everything apart then putting it back is not efficient. But a user is responsible for the wellformedness of the document postchange.
 
That is the 'ying' aspect of the VTD.
 
The opposite angel, "yang" so to speak, of VTD is that one can take a fragement
out of the document as a byte array. what it means is that there can actually be
an XPATH expression that addresses the XML fragment (using offset and length).
 
Putting those two things together, one can take a chunk from document A and stick
it into document B (as long as they have the same encoding).
 


Michael Champion <mc@xegesis.org> wrote:

On Jul 27, 2004, at 6:14 AM, Jonathan Robie wrote:

>>
>> http://vtd-xml.sf.net
>
> According to the description of VTD given at that URI, "It is a binary
> format specification, not an API specification.
>
> Did I get that wrong?
>

As I understand it, the Virtual Token Descriptor itself is a binary
format that describes the structure of a textual XML document. The VTD
project has an API that supports incremental update to the binary
format to point the updated element to a new block of text. I guess
that means that the updated text itself would have to be re-serialized
via the API to make it well-formed XML again, right Jimmy?

I find the VDT stuff an interesting combination of binary and textual
"XML" (broadly defined, let's not get into that permathread right now)
tools that may hit a sweet spot between performance and conformance,
for those who can live with a subset of XML that (at least currently)
doesn't include entities other than the built-in ones.


-----------------------------------------------------------------
The xml-dev list is sponsored by XML.org , an
initiative of OASIS

The list archives are at http://lists.xml.org/archives/xml-dev/

To subscribe or unsubscribe from this list use the subscription
manager:





 

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

Copyright 2001 XML.org. This site is hosted by OASIS