mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 08:21:25 +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
a1cbb4f003
commit
3e2c60a3e1
2 changed files with 15 additions and 2 deletions
|
@ -1,9 +1,14 @@
|
|||
2012-03-12 Fred Kiefer <FredKiefer@gmx.de>
|
||||
2012-03-16 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Source/NSXMLNode.m (-XMLStringWithOptions:): Protect the
|
||||
different format constants with version checks.
|
||||
|
||||
2012-03-14 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Source/NSXMLDocument.m (-XMLDataWithOptions:): Correct convesion
|
||||
to NSData. Add some comments.
|
||||
|
||||
2012-03-12 Fred Kiefer <FredKiefer@gmx.de>
|
||||
2012-03-14 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Source/NSXMLPrivate.h: Add comments on owner policy.
|
||||
* Source/NSXMLNode.m (-XMLStringWithOptions:): Reimplement to
|
||||
|
|
|
@ -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