RE: [xml] Newbie question: Coverting XMLDocPtr to char xmlbuff[25 6]



Title: RE: [xml] Newbie question: Coverting XMLDocPtr to char xmlbuff[256]

Thanks a lot..
The reason i had to put this in the mailing list is :-
Iam a hard core Java Developer.(Who knows a very little on C :)

I would suggest the admin to compile a detailed FAQ list and publish it.
It would help all the newbies like me who are new to C .

Regards
Vignesh

-----Original Message-----
From: Lucas Brasilino [mailto:brasilino recife pe gov br]
Sent: Thursday, March 25, 2004 9:21 PM
To: Vignesh, KC (GE Consumer & Industrial)
Cc: xml gnome org
Subject: Re: [xml] Newbie question: Coverting XMLDocPtr to char
xmlbuff[256]


Hi:

>      Iam new to C.
>      I have contructed a XML Document as follows.
...
>         /* This is the detination buffer*/
>         char xmlbuffer[256];
>       
>         How do I convert this "doc" to xmlbuffer ?
>         Iam struck at this place !
>         You help would be appreciated !

        You should use:
       
        http://xmlsoft.org/html/libxml-tree.html#xmlDocDumpMemory
       
<snippet>
        xmlChar *xmlbuffer;
        int buffersize;

        xmlDocDumpFormatMemory (doc, &xmlbuff, &buffersize, 1);

        printf ((char *)xmlbuff);
        xmlFree (xmlbuff);
</snippet>
       
       
        Always remember to check the documentation and ml archives :)

--

[]'s
Lucas Brasilino
brasilino recife pe gov br
http://www.recife.pe.gov.br
Emprel -        Empresa Municipal de Informatica (pt_BR)
                Municipal Computing Enterprise (en_US)
Recife - Pernambuco - Brasil
Fone: +55-81-34167078


_______________________________________________
xml mailing list, project page  http://xmlsoft.org/
xml gnome org
http://mail.gnome.org/mailman/listinfo/xml



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]