NativeXML usage

XML Example:

<? XML Version = '1.0' encoding = 'UTF-. 8'?>
<interface>
<Head>
<the returnCode> 9999 </ the returnCode>
<ReturnMessage> <[CDATA [10144:! The goods that are not related item information found ]]> </ ReturnMessage>
</ Head>
<the Data>
<Content> </ Content>
</ the Data>
</ interface>

 

1, read CDATA

Xml := TNativeXml.CreateName('interface');
Xml.ReadFromString(XML样例);

Xml.Root.NodeByName('Head').NodeByName('returnMessage').NodeByElementType(xeCData).ValueAsString;

Guess you like

Origin www.cnblogs.com/zhou114477/p/12033994.html