MCPcopy Create free account
hub / github.com/Kitware/VTK / xmlSaveToFd

Function xmlSaveToFd

ThirdParty/libxml2/vtklibxml2/xmlsave.c:2006–2020  ·  view source on GitHub ↗

* xmlSaveToFd: * @fd: a file descriptor number * @encoding: the encoding name to use or NULL * @options: a set of xmlSaveOptions * * Create a document saving context serializing to a file descriptor * with the encoding and the options given. * * Returns a new serialization context or NULL in case of error. */

Source from the content-addressed store, hash-verified

2004 * Returns a new serialization context or NULL in case of error.
2005 */
2006xmlSaveCtxtPtr
2007xmlSaveToFd(int fd, const char *encoding, int options)
2008{
2009 xmlSaveCtxtPtr ret;
2010
2011 ret = xmlNewSaveCtxt(encoding, options);
2012 if (ret == NULL) return(NULL);
2013 ret->buf = xmlOutputBufferCreateFd(fd, ret->handler);
2014 if (ret->buf == NULL) {
2015 xmlCharEncCloseFunc(ret->handler);
2016 xmlFreeSaveCtxt(ret);
2017 return(NULL);
2018 }
2019 return(ret);
2020}
2021
2022/**
2023 * xmlSaveToFilename:

Callers 1

parseAndPrintFileFunction · 0.85

Calls 4

xmlNewSaveCtxtFunction · 0.85
xmlOutputBufferCreateFdFunction · 0.85
xmlCharEncCloseFuncFunction · 0.85
xmlFreeSaveCtxtFunction · 0.85

Tested by

no test coverage detected