xerces-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jesse Pelton" <...@PKC.com>
Subject RE: DOMWriter Questions
Date Wed, 07 Apr 2004 19:36:05 GMT
If you only need to create simple, highly stereotyped documents, you
might get up to speed more quickly by just generating text.  A DOM
implementation makes it much easier to read, write, and use more varied
and/or complex documents, as well as ensuring that character encodings,
namespaces, and the like are handled correctly.  If you're confident you
can handle such issues correctly yourself, by all means do so; if you're
not sure what I'm talking about, Xerces will save you many headaches.

> -----Original Message-----
> From: Gareth Reakes 
> [mailto:parthenon@sphinx.mythic-beasts.com] On Behalf Of Gareth Reakes
> Sent: Wednesday, April 07, 2004 3:17 PM
> To: xerces-c-dev@xml.apache.org
> Subject: Re: DOMWriter Questions
> 
> Hi,
> 
> > DOMImplementation *impl =
> > 
> DOMImplementationRegistry::getDOMImplementation(XMLString::tra
> nscode("Core"));
> 
> It specifies a specific implementation to use. For example Core or
> Load/Save. Take a look at the specs a tutorial or the docs 
> for more info
> 
> http://xml.apache.org/xerces-c/apiDocs/classDOMImplementationR
> egistry.html
> 
> >
> > 2. What does XMLString::transcode("...") do, and why
> > is it needed?
> 
> It converts from a string to the internal xerces format which supports
> UTF16. Again, take a look at the docs for more info
> 
> http://xml.apache.org/xerces-c/apiDocs/classXMLString.html#z985_14
> 
> 
> > 3. What is the advantage of creating your own XML
> > document using the Xerces CreateDocument API versus
> > just encoding the XML string manually?  I'm new to
> > XML, and to be honest, I don't quite see the advantage
> > of creating your own document.  It seems much easier
> > to encode the string manually.  In both cases, you
> > would need to know the structure of the tree.
> 
> If I follow you correctly here then I think you are suggesting just
> building a string up that is XML. If this is the case then 
> you would not
> be able to call any of the methods that DOm supports on this 
> string. It
> would be hard to ensure the XML is well formed and very hard 
> to manipulate
> it.
> 
> 
> Gareth
> 
> -- 
> Gareth Reakes, Managing Director            +44-1865-811184
> Parthenon Computing                http://www.parthcomp.com

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org


Mime
View raw message