[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

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

  • To: xml-dev@l...
  • Subject: how to insert bytes into CDATASection (Xerces-C++)
  • From: bin sun <sunbin_cica@y...>
  • 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= ;

xerces createelement
This is a resend after joining the mail list.


Hi,

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 =
doc->createElement(X("metadata"));
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!
http://travel.yahoo.com/p-travelguide


Yahoo! Mail Mobile
http://us.rd.yahoo.com/mail_us/taglines/mobile/*http://mobile.yahoo.com/learn/mail Check email on your mobile phone.

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.