There are a “binary dump” or “get binary representation” function in LibXML2?

情到浓时终转凉″ 提交于 2019-12-04 17:15:39

Here are the relevant libxml2 methods:

There is a base64 encoding method:

Function: xmlTextWriterWriteBase64

int xmlTextWriterWriteBase64    (xmlTextWriterPtr writer, 
                     const char * data, 
                     int start, 
                     int len)

Write an base64 encoded xml text.
writer: the xmlTextWriterPtr
data:   binary data
start:  the position within the data of the first byte to encode
len:    the number of bytes to encode
Returns:    the bytes written (may be 0 because of buffering) or -1 in case of error

and a BinHex encoding method:

Function: xmlTextWriterWriteBinHex
int xmlTextWriterWriteBinHex    (xmlTextWriterPtr writer, 
                     const char * data, 
                     int start, 
                     int len)

Write a BinHex encoded xml text.
writer: the xmlTextWriterPtr
data:   binary data
start:  the position within the data of the first byte to encode
len:    the number of bytes to encode
Returns:    the bytes written (may be 0 because of buffering) or -1 in case of error

References

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!