mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 00:11:26 +00:00
* Source/NSXMLNode.m (-XMLStringWithOptions:): Protect the
different format constants with version checks. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@34935 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
be8b523df9
commit
87a4b8d458
2 changed files with 15 additions and 2 deletions
|
@ -1514,19 +1514,27 @@ execute_xpath(NSXMLNode *xmlNode, NSString *xpath_exp, NSString *nmspaces)
|
|||
buffer = xmlBufferCreate();
|
||||
|
||||
// XML_SAVE_XHTML XML_SAVE_AS_HTML XML_SAVE_NO_DECL XML_SAVE_NO_XHTML
|
||||
#if LIBXML_VERSION >= 20702
|
||||
xmlOptions |= XML_SAVE_AS_XML;
|
||||
#endif
|
||||
#if LIBXML_VERSION >= 20708
|
||||
if (options & NSXMLNodePreserveWhitespace)
|
||||
{
|
||||
xmlOptions |= XML_SAVE_WSNONSIG;
|
||||
}
|
||||
#endif
|
||||
#if LIBXML_VERSION >= 20622
|
||||
if (options & NSXMLNodeCompactEmptyElement)
|
||||
{
|
||||
xmlOptions |= XML_SAVE_NO_EMPTY;
|
||||
}
|
||||
#endif
|
||||
#if LIBXML_VERSION >= 20617
|
||||
if (options & NSXMLNodePrettyPrint)
|
||||
{
|
||||
xmlOptions |= XML_SAVE_FORMAT;
|
||||
}
|
||||
#endif
|
||||
|
||||
ctxt = xmlSaveToBuffer(buffer, "utf-8", xmlOptions);
|
||||
xmlSaveTree(ctxt, internal->node);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue