10#ifndef SAXON_XDMNODE_h
11#define SAXON_XDMNODE_h
13#include "saxonc_export.h"
14#include "saxonc/XdmItem.h"
17typedef enum eXdmNodeKind {
23 PROCESSING_INSTRUCTION = 7,
28enum class SAXONC_EXPORT EnumXdmAxis {
34 DESCENDANT_OR_SELF = 5,
36 FOLLOWING_SIBLING = 7,
40 PRECEDING_SIBLING = 11,
207 const char *
toString(
const char *encoding =
nullptr);
294 XdmNode **getChildren(
bool cache =
false);
305 XdmNode *getChild(
int i,
bool cache =
false);
323 void resetRelinquishedChildren();
328 void incrementRefCountForRelinquishedChildren();
334 bool hasRelinquishedChildren();
341 if (fetchedChildren !=
nullptr) {
342 delete[] fetchedChildren;
343 fetchedChildren =
nullptr;
350 const char *nodeName;
351 const char *localName;
359 XDM_NODE_KIND nodeKind;
virtual const char * getStringValue(const char *encoding=nullptr)
Get the string value of the item.
Definition XdmItem.cpp:56
XdmItem()
Default constructor.
Definition XdmItem.cpp:5
const char * toString(const char *encoding=nullptr)
Create a string representation of the item.
Definition XdmItem.cpp:71
virtual XdmItem * getHead()
Get the first item in the sequence consisting of just this item.
Definition XdmItem.cpp:41
virtual int64_t getUnderlyingValue()
Get the underlying Java XdmValue object - internal use only.
Definition XdmItem.cpp:52
virtual bool isAtomic()
Determine whether the item is an atomic value or some other type of item.
Definition XdmItem.cpp:31
This class represents a node in the XDM data model.
Definition XdmNode.h:57
bool equals(XdmNode *other)
The equals() relation between two XdmNode objects is true if they both represent the same node.
Definition XdmNode.cpp:40
XDM_TYPE getType()
Get the type of this XDM value.
Definition XdmNode.h:317
XdmNode * getParent()
Get the parent of this node.
Definition XdmNode.cpp:228
const char * getNodeName()
Get the name of the node, as a string in the form of a EQName.
Definition XdmNode.cpp:164
int64_t getUnderlyingValue()
Get the underlying Graalvm Java object for the XdmNode - internal use only.
Definition XdmNode.h:278
XdmValue * getTypedValue()
Get the typed value of this node, as defined in XDM.
Definition XdmNode.cpp:189
int getAttributeCount()
Get the number of attribute nodes for this node.
Definition XdmNode.cpp:313
const char * getBaseUri()
Get the base URI of this node.
Definition XdmNode.cpp:218
const char * getLocalName()
Get the local name of the node.
Definition XdmNode.cpp:139
bool isNode()
Determine whether the item is a node or some other type of item.
Definition XdmNode.h:285
int getColumnNumber()
Get the column number of the node in a source document.
Definition XdmNode.cpp:197
bool operator==(const XdmNode &other) const
XdmNode == operator.
Definition XdmNode.cpp:31
XdmNode(int64_t objRef)
XdmNode constructor to create an object which is a wrapper for a Java XdmNode object - internal use o...
Definition XdmNode.cpp:9
int getLineNumber()
Get the line number of the node in a source document.
Definition XdmNode.cpp:193
XdmNode ** axisNodes(EnumXdmAxis axis)
Get the array of nodes reachable from this node via a given axis.
Definition XdmNode.cpp:284
static void deleteChildrenArray(XdmNode **fetchedChildren)
Utility method required for the python and PHP extensions to delete a string created in the C++ code-...
Definition XdmNode.h:340
EnumXdmAxis convertEnumXdmAxis(int n)
Convert an int into the corresponding EnumXdmAxis Enum object.
Definition XdmNode.h:267
XDM_NODE_KIND getNodeKind()
Get the kind of the node.
Definition XdmNode.cpp:50
XdmNode ** getAttributeNodes(bool cache=false)
Get the attribute nodes of this element as an array.
Definition XdmNode.cpp:253
const char * getAttributeValue(const char *name)
Get the string value of a named attribute (in no namespace) of this element.
Definition XdmNode.cpp:237
An XdmValue represents a value in the XDM data model.
Definition XdmValue.h:33
XdmValue()
Default constructor.
Definition XdmValue.h:40