|
| <prev next> |
Re: problem at converting DOMDocument into XMLCh string: msg#00116text.xml.xerces-c.user
At 03.48 29/12/2006 -0800, Alexis Blaze wrote: like the subject said... i have some problem in converting DOMDocument into The quickest way is to use: XMLCh tempStr[100]; XMLString::transcode("LS", tempStr, 99); DOMImplementation *impl = DOMImplementationRegistry::getDOMImplementation(tempStr); DOMWriter *theSerializer = ((DOMImplementationLS*)impl)->createDOMWriter(); XMLCh* str=theSerializer->writeToString(*doc); i'm trying to used MemBufFormatTarget to do a writeChar, but If you need to write into a char* (I guess using UTF-8), you should do: MemBufFormatTarget target; XMLString::transcode("utf-8", tempStr, 99); theSerializer->setEncoding(tempStr); theSerializer->writeNode(&target, *doc); const XMLByte* utf8str=target.getRawBuffer(); Alberto Thank for your help.. |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | problem at converting DOMDocument into XMLCh string: 00116, Alexis Blaze |
|---|---|
| Next by Date: | Re: Xerces problem with Cygwin: 00116, Alberto Massari |
| Previous by Thread: | problem at converting DOMDocument into XMLCh stringi: 00116, Alexis Blaze |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |