Delphi and XML CDATA

How to extract CData from XML file using Delphi? this is my xml file:

<?xml version="1.0"?> <root> <PartoBeetaXMLVersion value="0.1"> <VersionID value="111"/> <Developer value="1Dev"/> <CDate value="10/12/2011"/> <Script> <![CDATA[ alter table tblPersonels add UID int null, RID int null ]]> </Script> </PartoBeetaXMLVersion> </root> 
+4
source share
1 answer

With OmniXML you would do:

 uses OmniXML, OmniXMLUtils; function GetScriptCData(const fileName: string): string var xml: IXMLDocument; begin Result := ''; xml := CreateXMLDoc; if XMLLoadFromFile(xml, fileName) then Result := GetNodeCData(xml.SelectSingleNode('/root/PartoBeetaXMLVersion/Script')); end; 
+6
source

All Articles