79 class XPathVariableSet;
83 class AttributeIterator;
84 class NamedNodeIterator;
103 typedef void (*unspecified_bool_type)(
Node***);
115 explicit Node(NodeStruct* p);
121 operator unspecified_bool_type()
const;
127 bool operator!()
const;
129 #if !(defined(SWIG) && defined(MEZZLUA51)) // Stop Swig from making lua bindings but allow other languages
135 bool operator==(
const Node& r)
const;
142 bool operator!=(
const Node& r)
const;
148 bool operator<(
const Node& r)
const;
154 bool operator>(
const Node& r)
const;
160 bool operator<=(
const Node& r)
const;
166 bool operator>=(
const Node& r)
const;
179 const Char8* Name()
const;
184 const Char8* Value()
const;
196 Node GetFirstChild()
const;
200 Node GetLastChild()
const;
205 Node GetNextSibling()
const;
210 Node GetPreviousSibling()
const;
214 Node GetParent()
const;
218 Node GetRoot()
const;
224 #if !(defined(SWIG) && defined(MEZZLUA51)) // Stop Swig from making lua bindings but allow other languages
236 {
return GetChild(Name.c_str()); }
246 Node GetNextSibling(
const Char8* Name)
const;
251 Node GetPreviousSibling(
const Char8* Name)
const;
256 const Char8* GetChildValue()
const;
261 const Char8* GetChildValue(
const Char8* Name)
const;
268 bool SetName(
const Char8* rhs);
275 {
return SetName(rhs.c_str()); }
282 bool SetValue(
const Char8* rhs);
284 #if !(defined(SWIG) && defined(MEZZLUA51)) // Stop Swig from making lua bindings but allow other languages
299 {
return AppendAttribute(Name.c_str()); }
386 #if !(defined(SWIG) && defined(MEZZLUA51)) // Stop Swig from making lua bindings but allow other languages
400 {
return AppendChild(Name.c_str()); }
402 #if !(defined(SWIG) && defined(MEZZLUA51)) // Stop Swig from making lua bindings but allow other languages
416 {
return PrependChild(Name.c_str()); }
440 Node PrependCopy(
const Node& proto);
446 Node InsertCopyAfter(
const Node& proto,
const Node& node);
452 Node InsertCopyBefore(
const Node& proto,
const Node& node);
457 bool RemoveAttribute(
const Attribute& a);
462 bool RemoveAttribute(
const Char8* Name);
467 bool RemoveChild(
const Node& n);
472 bool RemoveChild(
const Char8* Name);
500 if (!NodeData)
return Node();
518 if (!NodeData)
return Node();
520 Node cur = GetFirstChild();
523 if (pred(cur))
return cur;
544 Node FindChildbyAttribute(
const Char8* Name,
const Char8* AttrName,
const Char8* AttrValue)
const;
551 Node FindChildbyAttribute(
const Char8* AttrName,
const Char8* AttrValue)
const;
563 Node FirstElementByPath(
const Char8* Path,
Char8 delimiter =
'/')
const;
622 void Print(std::basic_ostream<
wchar_t, std::char_traits<wchar_t> >& os,
const Char8* indent =
"\t",
unsigned int flags =
FormatDefault,
unsigned int Depth = 0)
const;
630 iterator begin()
const;
634 iterator end()
const;
641 attribute_iterator attributes_begin()
const;
645 attribute_iterator attributes_end()
const;
663 ptrdiff_t OffSetDebug()
const;
668 size_t HashValue()
const;
673 NodeStruct* InternalObject()
const;
680 #endif // Include guard
Node PrependChild(const String &Name)
Creates an element Node as a child of this Node, with the given name at the beginning of the children...
bool SetName(const String &rhs)
Set the name of this object.
NodeStruct * NodeData
Stores pointers to the Node data and some metadata.
A light-weight handle for manipulating attributes in DOM tree.
Attribute GetNextAttribute() const
Get the next attribute.
A fixed sized collection of nodes that an XPathQuery can work on.
An XPath node which can store handles to a XML::Node or an XML::Attribute.
Node GetParent() const
Attempt to retrieve the parent of this Node.
A compiled XPath query object.
Node GetFirstChild() const
Get the first child Node of this Node.
All the definitions for datatypes as well as some basic conversion functions are defined here...
Node GetChild(const String &Name) const
Attempt to get a child Node with a given name.
Node FindNode(Predicate pred) const
Search for any Node descended from this Node using a function to check each Node individually.
Node GetNextSibling() const
Attempt to retrieve the next sibling of this Node.
A set of XPath variables.
Used to call a function OnEachNode member of the subtree of nodes descended from a specific node...
Node FindChild(Predicate pred) const
Search for an child ( only direct children ) Node using a function to check each Node individually...
char Char8
A datatype to represent one character.
Contains the definition for the XML::Attribute class.
Encoding
These flags determine the encoding of input data for an XML document.
Auto-detect input DocumentEncoding using BOM or < / detection; use UTF8 if BOM is not found...
Child node iterator (a bidirectional iterator over a collection of Node)
Used by the xml system to pass around iterable ranges.
A light-weight handle for manipulating nodes in DOM tree.
ProcessDepth Depth
The current process depth as interpretted by Main.
AttributeIterator attribute_iterator
An iterator for Attribute members on this Node.
Contains the implementation of the ObjectRange class template.
Child node iterator (a forward iterator over a collection of Node) only iterates over nodes with a gi...
NodeType
The types of nodes that could be in the XML Tree.
Node AppendChild(const String &Name)
Creates an element Node as a child of this Node, with the given name.
Enumerations and constant values used primarily in the XML system but useful for interacting with it ...
Attribute iterator (a bidirectional iterator over a collection of Attribute).
NodeIterator iterator
An iterator for child Nodes that will be easier for members of the std namespace to work with...
const unsigned int FormatDefault
The default set of formatting flags. Only FormatRaw is enabled.
Attribute AppendAttribute(const String &Name)
Creates an Attribute and puts it at the end of this Nodes attributes.
The bulk of the engine components go in this namspace.
Attribute FindAttribute(Predicate pred) const
Search for an Attribute using a function to check each Attribute individually.
A helper for working with text inside PCDATA nodes.
Interface for node printing (see Node::Print)
std::string String
A datatype used to a series of characters.