mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-31 00:30:53 +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
|
@ -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
|
* Source/NSXMLDocument.m (-XMLDataWithOptions:): Correct convesion
|
||||||
to NSData. Add some comments.
|
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/NSXMLPrivate.h: Add comments on owner policy.
|
||||||
* Source/NSXMLNode.m (-XMLStringWithOptions:): Reimplement to
|
* Source/NSXMLNode.m (-XMLStringWithOptions:): Reimplement to
|
||||||
|
|
|
@ -1514,19 +1514,27 @@ execute_xpath(NSXMLNode *xmlNode, NSString *xpath_exp, NSString *nmspaces)
|
||||||
buffer = xmlBufferCreate();
|
buffer = xmlBufferCreate();
|
||||||
|
|
||||||
// XML_SAVE_XHTML XML_SAVE_AS_HTML XML_SAVE_NO_DECL XML_SAVE_NO_XHTML
|
// XML_SAVE_XHTML XML_SAVE_AS_HTML XML_SAVE_NO_DECL XML_SAVE_NO_XHTML
|
||||||
|
#if LIBXML_VERSION >= 20702
|
||||||
xmlOptions |= XML_SAVE_AS_XML;
|
xmlOptions |= XML_SAVE_AS_XML;
|
||||||
|
#endif
|
||||||
|
#if LIBXML_VERSION >= 20708
|
||||||
if (options & NSXMLNodePreserveWhitespace)
|
if (options & NSXMLNodePreserveWhitespace)
|
||||||
{
|
{
|
||||||
xmlOptions |= XML_SAVE_WSNONSIG;
|
xmlOptions |= XML_SAVE_WSNONSIG;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
#if LIBXML_VERSION >= 20622
|
||||||
if (options & NSXMLNodeCompactEmptyElement)
|
if (options & NSXMLNodeCompactEmptyElement)
|
||||||
{
|
{
|
||||||
xmlOptions |= XML_SAVE_NO_EMPTY;
|
xmlOptions |= XML_SAVE_NO_EMPTY;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
#if LIBXML_VERSION >= 20617
|
||||||
if (options & NSXMLNodePrettyPrint)
|
if (options & NSXMLNodePrettyPrint)
|
||||||
{
|
{
|
||||||
xmlOptions |= XML_SAVE_FORMAT;
|
xmlOptions |= XML_SAVE_FORMAT;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
ctxt = xmlSaveToBuffer(buffer, "utf-8", xmlOptions);
|
ctxt = xmlSaveToBuffer(buffer, "utf-8", xmlOptions);
|
||||||
xmlSaveTree(ctxt, internal->node);
|
xmlSaveTree(ctxt, internal->node);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue