OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help



   how to insert bytes into CDATASection (Xerces-C++)

[ Lists Home | Date Index | Thread Index ]
  • To: xml-dev@lists.xml.org
  • Subject: how to insert bytes into CDATASection (Xerces-C++)
  • From: bin sun <sunbin_cica@yahoo.com>
  • Date: Tue, 19 Apr 2005 22:38:15 -0700 (PDT)
  • Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys
  • Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; b=WjfATxEDmc7Y2ttVmSgvTBQJ7wN9/KSbuqZohh3pMRcp4jmJlRnqFdUF8yqettp6JHD45H845bP7QCvjrTJEJFrWFtJ1GN7bHPiQSeB4Py5zU+xcWcIlJn2HiKphbZeFPBrVk5zC08BIB+3/rMgFupim91UTiRpCC1bfiJRAEyE= ;

This is a resend after joining the mail list.


I encountered problem when trying to insert severval
bytes (unsigned char) into a CDATASection when to
create a DOM tree in the memory. Please see the code
snippet in the trail.

If succeeded to enclose the bytes in a CDATASection,
what's the appropriate way to extract the bytes which
are identical to the original from the node?

Any pointers are highly appreciated.

Bin Sun

~ - ~ - ~ - ~ - ~ - ~ - ~ - ~ -

...doc is created as a valid DOMElement...
DOMElement* pMetaByElem =
unsigned char bs[4] = {'Q', 'R', 'S', 'T'};
DOMCDATASection * metaByDataVal =
doc->createCDATASection((XMLCh *) pMeta);
XMLSize_t size = metaByDataVal->getLength();

!!!now size is 58 rather than 4.
Also I tried to use XMLString::transcode(bs), which
failed too.

Do you Yahoo!?
Plan great trips with Yahoo! Travel: Now over 17,000 guides!

Yahoo! Mail Mobile
Take Yahoo! Mail with you! Check email on your mobile phone.


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS