Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

CDATA in TXMLDocument

15 views
Skip to first unread message

John Nguyen

unread,
Jun 21, 2004, 11:23:21 AM6/21/04
to
Hi,
I am new to XML. Below is my XML:
<MESSAGE>
<MESSAGE_SUBJECT><![CDATA[ ZLIB ]]></MESSAGE_SUBJECT>
<MESSAGE_ENCODING>Binary</MESSAGE_ENCODING>
<MESSAGE_BODY><![CDATA[ eJxTWZBggAWwsPExMLKw8TOMglFAFQAAD54FFw==
]]></MESSAGE_BODY>
</MESSAGE>

1. I tried to read the message in the <MESSAGE_BODY> into the
AnsiString but I got an error "element does not contain a single text
node". What is the code supposed to be if I want to read the data
string from the message body. Here is what I did:

_di_IXMLNode child = msg->ChildNodes->Nodes[0];
AnsiString t1 = child->ChildNodes->Nodes[2]->NodeValue;

2. Does any body know how decompress from the message body in ZLIB
into a file?

Thanks to any helps. I am using C++ builder 6.0 pro version.

John Nguyen

0 new messages