You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by Paul Tan <pa...@hotmail.com> on 2001/03/23 11:23:22 UTC

DOM_Document -> Buffer

Hi,

After creating new DOM_Document object with newly added elements, is there
method to convert the DOM_Document (DOM Tree) into a memory buffer (char *)
?

Any help would be appreciated.

Thanks
Paul

----- Original Message -----
From: Dean Roddey <dr...@portal.com>
To: <xe...@xml.apache.org>
Sent: Friday, March 23, 2001 6:30 AM
Subject: RE: encoding problems


> The best way might be to get an XMLTranscoder for ISO-8859-1 and transcode
> it via that. It will handle those high bit characters and pass the ASCII
> subset through unchanged I think. So look at the TransService object which
> is a static member of XMLPlatformUtils. Ask it to create you an
> XMLTranscoder for the encoding you want, and use that transcoder to do the
> work instead of XMLString (which BTW, isn't what you want ot use anyway
> since it just transcodes to the local code page, so you'd be screwed if
your
> code ever had to run on say an EBCDIC machine.)
>
> --------------
> Dean Roddey
> Software Geek Extraordinaire
> Portal, Inc
> droddey@portal.com
>
>
>
> -----Original Message-----
> From: Jeremy Sheeley [mailto:jeremy@sourcegear.com]
> Sent: Thursday, March 22, 2001 12:16 PM
> To: xerces-c-dev@xml.apache.org
> Subject: encoding problems
>
>
> I'm working with version 1.4 of xerces and parsing WML files.  Looking
> around the web, I found a page that causes xerces to behave unexpectedly.
> The problem is that it's a straight ASCII file, but with one non-ASCII
> character (the character's hex value is A2).  When I do a
> XMLString::transcode() on any string that contains this A2 character, I
get
> back "h=@h=@n" instead of the string I expect.  Are there any ideas on how
I
> can get around this?  Any help would be appreciated.
>
> -Jeremy Sheeley
> SourceGear
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org


Re: DOM_Document -> Buffer

Posted by "Jason E. Stewart" <ja...@openinformatics.com>.
"Paul Tan" <pa...@hotmail.com> writes:

> After creating new DOM_Document object with newly added elements, is there
> method to convert the DOM_Document (DOM Tree) into a memory buffer (char *)

This is in the FAQ. See the DOMPrint example.

jas.

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org