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

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





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