It's equivalent of calling virXPathString("string(.)", ctxt) but it
doesn't have to use the XPath resolving and parsing.
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
virXMLCheckIllegalChars;
virXMLChildElementCount;
virXMLExtractNamespaceXML;
+virXMLNodeContentString;
virXMLNodeNameEqual;
virXMLNodeSanitizeNamespaces;
virXMLNodeToString;
}
+/**
+ * virXMLNodeContentString:
+ * @node: XML dom node pointer
+ *
+ * Convenience function to return copy of content of an XML node.
+ *
+ * Returns the content value as string or NULL in case of failure.
+ * The caller is responsible for freeing the returned buffer.
+ */
+char *
+virXMLNodeContentString(xmlNodePtr node)
+{
+ return (char *)xmlNodeGetContent(node);
+}
+
+
/**
* virXPathBoolean:
* @xpath: the XPath string to evaluate
char * virXMLPropStringLimit(xmlNodePtr node,
const char *name,
size_t maxlen);
+char * virXMLNodeContentString(xmlNodePtr node);
long virXMLChildElementCount(xmlNodePtr node);
/* Internal function; prefer the macros below. */