I have several text strings that contain well-formed XML.
I would like to be able (1) to turn these lines into IXMLNodes , then (2) add them to an existing XMLDocument . It is preferable not to declare a new XMLDocument .
Is this not possible?
Is there any easy way to accomplish something equivalent? My initial thought was to use the IXMLNode.XML (string) property and insert new lines. There is no luck like IXMLNode.XML read-only.
Here is an example if I had the following lines in a TStringList ,
<Property Name="Version" RttiType="tkString"></Property> <Property Name="ShowSubunit" RttiType="tkBoolean"></Property>
And I had the following XML already loaded into TXMLDocument , how can I easily add the two lines above in the TXMLDocument below?
<Program Name="PFOO"> <Class Name="CFOO"> <Property Name="DBN" RttiType="tkString"/> <Property Name="SDate" RttiType="tkClass" ClassType="TXSDATE">12/30/1899</Property> <Property Name="XForm" RttiType="tkEnumeration">xfXML</Property> <Property Name="Singleton" RttiType="tkBoolean">True</Property> </Class> </Program>
Any other (simple) ways to achieve this (without a secure hack on an XML resource)?
Thanks!
source share