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,
82 bool operator==(
const XdmNode& other)
const;
122 XDM_NODE_KIND getNodeKind();
130 const char *getNodeName();
138 const char *getLocalName();
158 int getColumnNumber();
166 const char *getBaseUri();
207 const char *
toString(
const char *encoding =
nullptr);
226 const char *getAttributeValue(
const char *name);
233 int getAttributeCount();
244 XdmNode **getAttributeNodes(
bool cache =
false);
259 XdmNode **axisNodes(EnumXdmAxis axis);
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;
The class XdmItem represents an item in a sequence, as defined by the XDM data model.
Definition XdmItem.h:31
virtual const char * getStringValue(const char *encoding=nullptr)
Get the string value of the item.
Definition XdmItem.cpp:56
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
XDM_TYPE getType()
Get the type of this XDM value.
Definition XdmNode.h:317
int64_t getUnderlyingValue()
Get the underlying Graalvm Java object for the XdmNode - internal use only.
Definition XdmNode.h:278
bool isNode()
Determine whether the item is a node or some other type of item.
Definition XdmNode.h:285
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
An XdmValue represents a value in the XDM data model.
Definition XdmValue.h:43