[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Is DOM parsing real-time?


dom training
2/14/2002 11:03:05 AM, asd asd <j2eeconsulting@y...> wrote:

>If I parse in a document, then alter that document's
>contents by adding/removing nodes, changing data etc,
>do I have to re-parse the doc when I'm done to make
>sure it's still valid, or is it always guaranteed to
>be valid along the way? Thanks

DOM Level 3 will have, and some vendor-specific extensions
now have, methods to check the validity of a document
against a schema/DTD.  There is a feature in DOM Level 
3 that can be turned on to do real-time validatation 
(i.e., not allow a change that would make the doc 
invalid) but it is not the default.  I don't know,
but it may only end up being implemented by authoring
tool vendors that do this kind of thing anyway; it's
a fairly "heavy" feature.

But in general, the answer is you are NOT guaranteed 
that modifications made via the DOM leave the
document in valid state.  You'll have to explicitly 
do something -- call a method, save and reload, whatever
your environment supports -- to ensure validity.



PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.