Exemplo n.º 1
0
/*================================================================
*   membuffer_destroy
*
*
*=================================================================*/
void
ixml_membuf_destroy( INOUT ixml_membuf * m )
{
    if( m == NULL ) {
        return;
    }

    free( m->buf );
    ixml_membuf_init( m );
}
Exemplo n.º 2
0
DOMString ixmlNodetoString(IXML_Node *node)
{
	ixml_membuf memBuf;
	ixml_membuf *buf = &memBuf;

	if (node == NULL) {
		return NULL;
	}

	ixml_membuf_init(buf);
	ixmlDomTreetoString(node, buf);

	return buf->buf;
}
Exemplo n.º 3
0
/*================================================================
*   ixmlPrintNode
*       Print DOM tree under node. Puts lots of white spaces
*       External function.
*
*=================================================================*/
DOMString
ixmlPrintNode( IN IXML_Node * node )
{

    ixml_membuf memBuf;
    ixml_membuf *buf = &memBuf;

    if( node == NULL ) {
        return NULL;
    }

    ixml_membuf_init( buf );
    ixmlPrintDomTree( node, buf );
    return buf->buf;

}
Exemplo n.º 4
0
DOMString ixmlDocumenttoString(IXML_Document *doc)
{
	IXML_Node* rootNode = (IXML_Node *)doc;
	ixml_membuf memBuf;
	ixml_membuf *buf = &memBuf;

	if(rootNode == NULL) {
		return NULL;
	}

	ixml_membuf_init(buf);
	ixml_membuf_append_str(buf, "<?xml version=\"1.0\"?>\r\n");
	ixmlDomTreetoString(rootNode, buf);

	return buf->buf;
}