1. Computing

XML :: Delphi's TXmlDocument component can be used to either read (and process) an existing XML document or to construct a new, empty XML document.

Unfortunately, Delphi's implementation of the TXMLDocument component, which basically uses Microsoft XML parser by default, does not provide a way to add a node of the "ntDocType" (TNodeType type).

Read the full article for a Neat trick to add !DocType and ?XML to the TXmlDocument

Related: Exporting a TreeView to XML. Populating a TreeView from XML | Work with dynamically created TXMLDocument | Reading and Manipulating XML files (RSS feeds) with Delphi

Comments
September 18, 2009 at 9:28 am
(1) Alex Artsikhovsky says:

Well… article is confusing… not to say funny.

Even if the name is “How to Create the “!DocType” and “?XML” Elements using TXmlDocument”, in article this achieved using TStringList.
So what TXMLDocument has to do with it?

September 18, 2009 at 1:00 pm
(2) Zarko Gajic says:

@Alex: Well when you need to create XML you *would* use TXMLDocument – not TStringList. But if you need to add “!DocType” or “?XML” to that XML, you can do it if you cheat using TStringList. Therefore TXMLDocument to create XML, TStringList to add non supported nodes.

Leave a Comment

Line and paragraph breaks are automatic. Some HTML allowed: <a href="" title="">, <b>, <i>, <strike>

©2014 About.com. All rights reserved.