These questions on DOM Serialization have prompted a question.  I
essentially built my own set of classes to build a semi-valid XML template
file that uses a DTD declaration and that will later be populated with data,
but I wonder if I should've just used the DOM parser since I need it in my
application anyway to parse the data-filled-in XML files. (by "semi-valid" I
mean the nodes are in correct order, but the PCDATA, ATTLIST, ENTITY, and
such data aren't populated yet. The nodes only contain placeholders so I can
do a simple search and replace).

If we build a DOM document and it needs to meet a DTD's validation, does the
DOM build the nodes in the correct order so that when they are streamed to
an output that the resulting XML file will be valid (after proper data and
attributes are filled in) ?



> -----Original Message-----
> From: [EMAIL PROTECTED] [SMTP:[EMAIL PROTECTED]]
> Sent: Friday, June 15, 2001 11:24 AM
> To:   [EMAIL PROTECTED]
> Subject:      Re: DOM output to file
> 
> 
> Standard response: Pending someone porting the "serializer" classes from
> the Java version (which would be a good beach-house-evenings project for
> someone -- volunteers welcome!) , see the DOMPrint sample program for a
> primitive version.
> 
> Doing the essentials is trivial enough to be a class exercise. Doing it
> _right_ -- with enough flexibility to handle real-world usecases, and with
> proper treatment of all the edge cases where the DOM permits something
> that
> XML syntax doesn't -- is harder.
> 
> DOM Level 3 plans to add a load/save API. Presumably Apache will implement
> that by extending the existing serializers...
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to