CodePorting.Translator Cs2Cpp
CodePorting.Translator.Cs2Cpp.Framework
xpath_navigator.h
1
2
3#pragma once
4
5#include <xml/xpath/xpath_node_type.h>
6#include <xml/xpath/xpath_namespace_scope.h>
7#include <xml/xpath/xpath_item.h>
8#include <xml/xpath/ixpath_navigable.h>
9#include <xml/xml_node_order.h>
10#include <xml/xml_namespace_scope.h>
11#include <xml/schema/validation_event_handler.h>
12#include <xml/ixml_namespace_resolver.h>
13#include <system/array.h>
14#include <cstdint>
15
16
18namespace System
19{
20namespace Collections
21{
22namespace Generic
23{
24template <typename, typename> class IDictionary;
25template <typename> class IEqualityComparer;
26} // namespace Generic
27} // namespace Collections
28class DateTime;
29namespace Internal
30{
31namespace Xml
32{
33namespace Cache
34{
35class XPathDocumentBuilder;
36class XPathDocumentElementDescendantIterator;
37class XPathDocumentKindDescendantIterator;
38class XPathNode;
39class XPathNodeHelper;
40} // namespace Cache
41namespace XPath
42{
43class XPathArrayIterator;
44} // namespace XPath
45} // namespace Xml
46} // namespace Internal
47class TypeInfo;
48namespace Xml
49{
50namespace Schema
51{
52class IXmlSchemaInfo;
53class ValidationEventArgs;
54class XmlSchemaAttribute;
55class XmlSchemaElement;
56class XmlSchemaSet;
57class XmlSchemaType;
58} // namespace Schema
59class XmlNamespaceManager;
60class XmlNameTable;
61class XmlReader;
62class XmlWriter;
63namespace XPath
64{
65class XPathExpression;
66class XPathNavigatorKeyComparer;
67class XPathNavigatorReader;
68class XPathNodeIterator;
69} // namespace XPath
70namespace Xsl
71{
72namespace XsltOld
73{
74class XsltCompileContext;
75} // namespace XsltOld
76} // namespace Xsl
77} // namespace Xml
78} // namespace System
80
81namespace System {
82
83namespace Xml {
84
85namespace XPath {
86
88class ASPOSECPP_SHARED_CLASS XPathNavigator : public XPathItem, public IXPathNavigable, public IXmlNamespaceResolver
89{
91 typedef XPathItem BaseType;
94
95 typedef ::System::BaseTypesInfo<BaseType, BaseType1, BaseType2> ThisTypeBaseTypesInfo;
96 ASPOSECPP_SHARED_RTTI_INFO_DECL();
97
98public:
99
102
103private:
105 friend class Internal::Xml::Cache::XPathDocumentBuilder;
106 friend class XPathNodeIterator;
107 friend class Internal::Xml::Cache::XPathDocumentElementDescendantIterator;
108 friend class Internal::Xml::Cache::XPathDocumentKindDescendantIterator;
109 friend class Internal::Xml::Cache::XPathNode;
110 friend class Internal::Xml::Cache::XPathNodeHelper;
111 friend class Internal::Xml::XPath::XPathArrayIterator;
112 friend class XPathNavigatorReader;
113 friend class XPathNodeIterator;
114 friend class Xsl::XsltOld::XsltCompileContext;
116
117private:
118
119 class CheckValidityHelper : public System::Object
120 {
121 typedef CheckValidityHelper ThisType;
122 typedef System::Object BaseType;
123
124 typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
125 RTTI_INFO_DECL();
126
127 public:
128
130 bool get_IsValid();
131
132 CheckValidityHelper(System::Xml::Schema::ValidationEventHandler nextEventHandler, const SharedPtr<XPathNavigatorReader>& reader);
133
134 void ValidationCallback(const SharedPtr<Object>& sender, const SharedPtr<System::Xml::Schema::ValidationEventArgs>& args);
136
137 protected:
138
139 #ifdef ASPOSE_GET_SHARED_MEMBERS
140 void GetSharedMembers(System::Object::shared_members_type& result) const override;
141 #endif
142
143
144 private:
145
146 bool _isValid;
149
150 };
151
152
153public:
154
157 ASPOSECPP_SHARED_API bool get_IsNode() override;
163 ASPOSECPP_SHARED_API SharedPtr<Object> get_TypedValue() override;
166 ASPOSECPP_SHARED_API TypeInfo get_ValueType() override;
171 ASPOSECPP_SHARED_API bool get_ValueAsBoolean() override;
176 ASPOSECPP_SHARED_API DateTime get_ValueAsDateTime() override;
181 ASPOSECPP_SHARED_API double get_ValueAsDouble() override;
186 ASPOSECPP_SHARED_API int32_t get_ValueAsInt() override;
191 ASPOSECPP_SHARED_API int64_t get_ValueAsLong() override;
194 virtual ASPOSECPP_SHARED_API SharedPtr<XmlNameTable> get_NameTable() = 0;
200 virtual ASPOSECPP_SHARED_API XPathNodeType get_NodeType() = 0;
204 virtual ASPOSECPP_SHARED_API String get_LocalName() = 0;
208 virtual ASPOSECPP_SHARED_API String get_Name() = 0;
212 virtual ASPOSECPP_SHARED_API String get_NamespaceURI() = 0;
215 virtual ASPOSECPP_SHARED_API String get_Prefix() = 0;
218 virtual ASPOSECPP_SHARED_API String get_BaseURI() = 0;
222 virtual ASPOSECPP_SHARED_API bool get_IsEmptyElement() = 0;
226 virtual ASPOSECPP_SHARED_API String get_XmlLang();
230 virtual ASPOSECPP_SHARED_API SharedPtr<Object> get_UnderlyingObject();
235 virtual ASPOSECPP_SHARED_API bool get_HasAttributes();
238 virtual ASPOSECPP_SHARED_API bool get_HasChildren();
244 virtual ASPOSECPP_SHARED_API bool get_CanEdit();
247 virtual ASPOSECPP_SHARED_API String get_OuterXml();
250 virtual ASPOSECPP_SHARED_API void set_OuterXml(String value);
253 virtual ASPOSECPP_SHARED_API String get_InnerXml();
257 virtual ASPOSECPP_SHARED_API void set_InnerXml(String value);
258
265 virtual ASPOSECPP_SHARED_API void SetValue(String value);
272 virtual ASPOSECPP_SHARED_API void SetTypedValue(SharedPtr<Object> typedValue);
279 ASPOSECPP_SHARED_API SharedPtr<Object> ValueAs(const TypeInfo& returnType, SharedPtr<IXmlNamespaceResolver> nsResolver) override;
282 ASPOSECPP_SHARED_API SharedPtr<XPathNavigator> CreateNavigator() override;
289 ASPOSECPP_SHARED_API String LookupNamespace(const String& prefix) override;
295 ASPOSECPP_SHARED_API String LookupPrefix(const String& namespaceURI) override;
302 virtual ASPOSECPP_SHARED_API SharedPtr<XPathNavigator> Clone() = 0;
306 virtual ASPOSECPP_SHARED_API SharedPtr<XmlReader> ReadSubtree();
309 virtual ASPOSECPP_SHARED_API void WriteSubtree(SharedPtr<XmlWriter> writer);
315 virtual ASPOSECPP_SHARED_API String GetAttribute(String localName, String namespaceURI);
321 virtual ASPOSECPP_SHARED_API bool MoveToAttribute(String localName, String namespaceURI);
326 virtual ASPOSECPP_SHARED_API bool MoveToFirstAttribute() = 0;
331 virtual ASPOSECPP_SHARED_API bool MoveToNextAttribute() = 0;
336 virtual ASPOSECPP_SHARED_API String GetNamespace(String name);
342 virtual ASPOSECPP_SHARED_API bool MoveToNamespace(String name);
347 virtual ASPOSECPP_SHARED_API bool MoveToFirstNamespace(XPathNamespaceScope namespaceScope) = 0;
352 virtual ASPOSECPP_SHARED_API bool MoveToNextNamespace(XPathNamespaceScope namespaceScope) = 0;
356 ASPOSECPP_SHARED_API bool MoveToFirstNamespace();
360 ASPOSECPP_SHARED_API bool MoveToNextNamespace();
365 virtual ASPOSECPP_SHARED_API bool MoveToNext() = 0;
370 virtual ASPOSECPP_SHARED_API bool MoveToPrevious() = 0;
378 virtual ASPOSECPP_SHARED_API bool MoveToFirst();
383 virtual ASPOSECPP_SHARED_API bool MoveToFirstChild() = 0;
388 virtual ASPOSECPP_SHARED_API bool MoveToParent() = 0;
390 virtual ASPOSECPP_SHARED_API void MoveToRoot();
396 virtual ASPOSECPP_SHARED_API bool MoveTo(SharedPtr<XPathNavigator> other) = 0;
401 virtual ASPOSECPP_SHARED_API bool MoveToId(String id) = 0;
407 virtual ASPOSECPP_SHARED_API bool MoveToChild(String localName, String namespaceURI);
412 virtual ASPOSECPP_SHARED_API bool MoveToChild(XPathNodeType type);
417 virtual ASPOSECPP_SHARED_API bool MoveToFollowing(String localName, String namespaceURI);
425 virtual ASPOSECPP_SHARED_API bool MoveToFollowing(String localName, String namespaceURI, SharedPtr<XPathNavigator> end);
430 virtual ASPOSECPP_SHARED_API bool MoveToFollowing(XPathNodeType type);
438 virtual ASPOSECPP_SHARED_API bool MoveToFollowing(XPathNodeType type, SharedPtr<XPathNavigator> end);
445 virtual ASPOSECPP_SHARED_API bool MoveToNext(String localName, String namespaceURI);
451 virtual ASPOSECPP_SHARED_API bool MoveToNext(XPathNodeType type);
456 virtual ASPOSECPP_SHARED_API bool IsSamePosition(SharedPtr<XPathNavigator> other) = 0;
460 virtual ASPOSECPP_SHARED_API bool IsDescendant(SharedPtr<XPathNavigator> nav);
464 virtual ASPOSECPP_SHARED_API XmlNodeOrder ComparePosition(SharedPtr<XPathNavigator> nav);
475 virtual ASPOSECPP_SHARED_API bool CheckValidity(SharedPtr<System::Xml::Schema::XmlSchemaSet> schemas, System::Xml::Schema::ValidationEventHandler validationEventHandler);
481 virtual ASPOSECPP_SHARED_API SharedPtr<XPathExpression> Compile(String xpath);
489 virtual ASPOSECPP_SHARED_API SharedPtr<XPathNavigator> SelectSingleNode(String xpath);
513 virtual ASPOSECPP_SHARED_API SharedPtr<XPathNodeIterator> Select(String xpath);
521 virtual ASPOSECPP_SHARED_API SharedPtr<XPathNodeIterator> Select(String xpath, SharedPtr<IXmlNamespaceResolver> resolver);
534 virtual ASPOSECPP_SHARED_API SharedPtr<Object> Evaluate(String xpath);
543 virtual ASPOSECPP_SHARED_API SharedPtr<Object> Evaluate(String xpath, SharedPtr<IXmlNamespaceResolver> resolver);
550 virtual ASPOSECPP_SHARED_API SharedPtr<Object> Evaluate(SharedPtr<XPathExpression> expr);
564 virtual ASPOSECPP_SHARED_API bool Matches(SharedPtr<XPathExpression> expr);
570 virtual ASPOSECPP_SHARED_API bool Matches(String xpath);
580 virtual ASPOSECPP_SHARED_API SharedPtr<XPathNodeIterator> SelectChildren(String name, String namespaceURI);
586 virtual ASPOSECPP_SHARED_API SharedPtr<XPathNodeIterator> SelectAncestors(XPathNodeType type, bool matchSelf);
594 virtual ASPOSECPP_SHARED_API SharedPtr<XPathNodeIterator> SelectAncestors(String name, String namespaceURI, bool matchSelf);
599 virtual ASPOSECPP_SHARED_API SharedPtr<XPathNodeIterator> SelectDescendants(XPathNodeType type, bool matchSelf);
606 virtual ASPOSECPP_SHARED_API SharedPtr<XPathNodeIterator> SelectDescendants(String name, String namespaceURI, bool matchSelf);
614 virtual ASPOSECPP_SHARED_API SharedPtr<XmlWriter> PrependChild();
622 virtual ASPOSECPP_SHARED_API SharedPtr<XmlWriter> AppendChild();
628 virtual ASPOSECPP_SHARED_API SharedPtr<XmlWriter> InsertAfter();
634 virtual ASPOSECPP_SHARED_API SharedPtr<XmlWriter> InsertBefore();
639 virtual ASPOSECPP_SHARED_API SharedPtr<XmlWriter> CreateAttributes();
647 virtual ASPOSECPP_SHARED_API SharedPtr<XmlWriter> ReplaceRange(SharedPtr<XPathNavigator> lastSiblingToReplace);
655 virtual ASPOSECPP_SHARED_API void ReplaceSelf(String newNode);
664 virtual ASPOSECPP_SHARED_API void ReplaceSelf(SharedPtr<XmlReader> newNode);
672 virtual ASPOSECPP_SHARED_API void ReplaceSelf(SharedPtr<XPathNavigator> newNode);
680 virtual ASPOSECPP_SHARED_API void AppendChild(String newChild);
690 virtual ASPOSECPP_SHARED_API void AppendChild(SharedPtr<XmlReader> newChild);
698 virtual ASPOSECPP_SHARED_API void AppendChild(SharedPtr<XPathNavigator> newChild);
706 virtual ASPOSECPP_SHARED_API void PrependChild(String newChild);
716 virtual ASPOSECPP_SHARED_API void PrependChild(SharedPtr<XmlReader> newChild);
724 virtual ASPOSECPP_SHARED_API void PrependChild(SharedPtr<XPathNavigator> newChild);
732 virtual ASPOSECPP_SHARED_API void InsertBefore(String newSibling);
741 virtual ASPOSECPP_SHARED_API void InsertBefore(SharedPtr<XmlReader> newSibling);
748 virtual ASPOSECPP_SHARED_API void InsertBefore(SharedPtr<XPathNavigator> newSibling);
756 virtual ASPOSECPP_SHARED_API void InsertAfter(String newSibling);
765 virtual ASPOSECPP_SHARED_API void InsertAfter(SharedPtr<XmlReader> newSibling);
772 virtual ASPOSECPP_SHARED_API void InsertAfter(SharedPtr<XPathNavigator> newSibling);
778 virtual ASPOSECPP_SHARED_API void DeleteRange(SharedPtr<XPathNavigator> lastSiblingToDelete);
783 virtual ASPOSECPP_SHARED_API void DeleteSelf();
795 virtual ASPOSECPP_SHARED_API void PrependChildElement(String prefix, String localName, String namespaceURI, String value);
806 virtual ASPOSECPP_SHARED_API void AppendChildElement(String prefix, String localName, String namespaceURI, String value);
818 virtual ASPOSECPP_SHARED_API void InsertElementBefore(String prefix, String localName, String namespaceURI, String value);
830 virtual ASPOSECPP_SHARED_API void InsertElementAfter(String prefix, String localName, String namespaceURI, String value);
840 virtual ASPOSECPP_SHARED_API void CreateAttribute(String prefix, String localName, String namespaceURI, String value);
843 ASPOSECPP_SHARED_API String ToString() const override;
844
845protected:
846
849
850 uint32_t get_IndexInParent();
851
852 static ArrayPtr<char16_t> NodeTypeLetter;
853 static ArrayPtr<char16_t> UniqueIdTbl;
854
855 virtual ASPOSECPP_SHARED_API String get_UniqueId();
856
857 static const int32_t AllMask;
858 static const int32_t NoAttrNmspMask;
859 static const int32_t TextMask;
860 static ArrayPtr<int32_t> ContentKindMasks;
861
862 bool MoveToPrevious(String localName, const String& namespaceURI);
863 bool MoveToPrevious(XPathNodeType type);
864 bool MoveToNonDescendant();
865 static SharedPtr<XmlNamespaceManager> GetNamespaces(const SharedPtr<IXmlNamespaceResolver>& resolver);
866 static int32_t GetContentKindMask(XPathNodeType type);
867 static int32_t GetKindMask(XPathNodeType type);
868 static bool IsText(XPathNodeType type);
869 void BuildSubtree(const SharedPtr<XmlReader>& reader, const SharedPtr<XmlWriter>& writer);
871
872 virtual ASPOSECPP_SHARED_API ~XPathNavigator();
873
874private:
875
876 String ToString_NonConst();
878 static SharedPtr<XPathExpression> CompileMatchPattern(const String& xpath);
879 static int32_t GetDepth(const SharedPtr<XPathNavigator>& nav);
880 XmlNodeOrder CompareSiblings(const SharedPtr<XPathNavigator>& n1, const SharedPtr<XPathNavigator>& n2);
881 bool IsValidChildType(XPathNodeType type);
882 bool IsValidSiblingType(XPathNodeType type);
883 SharedPtr<XmlReader> CreateReader();
884 SharedPtr<XmlReader> CreateContextReader(const String& xml, bool fromCurrentNode);
885
886 static struct __StaticConstructor__ { __StaticConstructor__(); } s_constructor__;
887
888};
889
890} // namespace XPath
891} // namespace Xml
892} // namespace System
893
894
Represents a specific date and time value on the time continuum. This type should be allocated on sta...
Definition: date_time.h:50
Base class that enables using methods available for System.Object class in C#. All non-trivial classe...
Definition: object.h:62
Pointer class to wrap types being allocated on heap. Use it to manage memory for classes inheriting O...
Definition: smart_ptr.h:180
String class used across the library. Is a substitute for C# System.String when translating code....
Definition: string.h:122
Represents a particular type and provides information about it.
Definition: type_info.h:109
Provides read-only access to a set of prefix and namespace mappings.
Definition: ixml_namespace_resolver.h:29
Provides an accessor to the XPathNavigator class.
Definition: ixpath_navigable.h:29
Represents an item in the XQuery 1.0 and XPath 2.0 Data Model.
Definition: xpath_item.h:34
Provides a cursor model for navigating and editing XML data.
Definition: xpath_navigator.h:89
virtual SharedPtr< XmlWriter > CreateAttributes()
Returns an XmlWriter object used to create new attributes on the current element.
virtual void AppendChild(SharedPtr< XPathNavigator > newChild)
Creates a new child node at the end of the list of child nodes of the current node using the nodes in...
virtual void AppendChildElement(String prefix, String localName, String namespaceURI, String value)
Creates a new child element node at the end of the list of child nodes of the current node using the ...
virtual bool MoveToChild(XPathNodeType type)
Moves the XPathNavigator to the child node of the XPathNodeType specified.
SharedPtr< XPathNavigator > CreateNavigator() override
Returns a copy of the XPathNavigator.
virtual SharedPtr< XPathNavigator > SelectSingleNode(String xpath, SharedPtr< IXmlNamespaceResolver > resolver)
Selects a single node in the XPathNavigator object using the specified XPath query with the IXmlNames...
virtual bool get_HasChildren()
Returns a value that indicates whether the current node has any child nodes.
virtual void DeleteRange(SharedPtr< XPathNavigator > lastSiblingToDelete)
Deletes a range of sibling nodes from the current node to the node specified.
virtual bool Matches(String xpath)
Determines whether the current node matches the specified XPath expression.
virtual void PrependChild(SharedPtr< XPathNavigator > newChild)
Creates a new child node at the beginning of the list of child nodes of the current node using the no...
SharedPtr< Collections::Generic::IDictionary< String, String > > GetNamespacesInScope(XmlNamespaceScope scope) override
Returns the in-scope namespaces of the current node.
virtual bool get_CanEdit()
Returns a value that indicates whether the XPathNavigator can edit the underlying XML data.
virtual SharedPtr< XmlWriter > AppendChild()
Returns an XmlWriter object used to create one or more new child nodes at the end of the list of chil...
virtual SharedPtr< XPathNodeIterator > SelectChildren(String name, String namespaceURI)
Selects all the child nodes of the current node that have the local name and namespace URI specified.
virtual SharedPtr< XmlWriter > InsertAfter()
Returns an XmlWriter object used to create a new sibling node after the currently selected node.
virtual bool MoveToNext()=0
When overridden in a derived class, moves the XPathNavigator to the next sibling node of the current ...
virtual void PrependChild(String newChild)
Creates a new child node at the beginning of the list of child nodes of the current node using the XM...
virtual void WriteSubtree(SharedPtr< XmlWriter > writer)
Streams the current node and its child nodes to the XmlWriter object specified.
virtual SharedPtr< Object > Evaluate(String xpath, SharedPtr< IXmlNamespaceResolver > resolver)
Evaluates the specified XPath expression and returns the typed result, using the IXmlNamespaceResolve...
virtual SharedPtr< XPathNodeIterator > SelectDescendants(XPathNodeType type, bool matchSelf)
Selects all the descendant nodes of the current node that have a matching XPathNodeType.
virtual SharedPtr< Object > Evaluate(SharedPtr< XPathExpression > expr)
Evaluates the XPathExpression and returns the typed result.
SharedPtr< System::Xml::Schema::XmlSchemaType > get_XmlType() override
Returns the XmlSchemaType information for the current node.
virtual void set_OuterXml(String value)
Sets the markup representing the opening and closing tags of the current node and its child nodes.
virtual bool MoveToPrevious()=0
When overridden in a derived class, moves the XPathNavigator to the previous sibling node of the curr...
virtual String get_Prefix()=0
When overridden in a derived class, gets the namespace prefix associated with the current node.
virtual bool MoveToFollowing(XPathNodeType type, SharedPtr< XPathNavigator > end)
Moves the XPathNavigator to the following element of the XPathNodeType specified, to the boundary spe...
virtual SharedPtr< Object > Evaluate(SharedPtr< XPathExpression > expr, SharedPtr< XPathNodeIterator > context)
Uses the supplied context to evaluate the XPathExpression, and returns the typed result.
virtual XmlNodeOrder ComparePosition(SharedPtr< XPathNavigator > nav)
Compares the position of the current XPathNavigator with the position of the XPathNavigator specified...
virtual SharedPtr< XPathNavigator > SelectSingleNode(String xpath)
Selects a single node in the XPathNavigator using the specified XPath query.
virtual bool IsSamePosition(SharedPtr< XPathNavigator > other)=0
When overridden in a derived class, determines whether the current XPathNavigator is at the same posi...
virtual String get_XmlLang()
Returns the xml:lang scope for the current node.
bool get_ValueAsBoolean() override
Returns the current node's value as a Boolean.
virtual bool MoveToParent()=0
When overridden in a derived class, moves the XPathNavigator to the parent node of the current node.
virtual bool MoveToNextNamespace(XPathNamespaceScope namespaceScope)=0
When overridden in a derived class, moves the XPathNavigator to the next namespace node matching the ...
virtual String get_InnerXml()
Returns the markup representing the child nodes of the current node.
virtual bool MoveToNextAttribute()=0
When overridden in a derived class, moves the XPathNavigator to the next attribute.
virtual String GetNamespace(String name)
Returns the value of the namespace node corresponding to the specified local name.
virtual bool MoveToAttribute(String localName, String namespaceURI)
Moves the XPathNavigator to the attribute with the matching local name and namespace URI.
double get_ValueAsDouble() override
Returns the current node's value as a Double.
virtual SharedPtr< XPathNodeIterator > SelectAncestors(String name, String namespaceURI, bool matchSelf)
Selects all the ancestor nodes of the current node that have the specified local name and namespace U...
virtual SharedPtr< XmlWriter > InsertBefore()
Returns an XmlWriter object used to create a new sibling node before the currently selected node.
virtual void PrependChildElement(String prefix, String localName, String namespaceURI, String value)
Creates a new child element at the beginning of the list of child nodes of the current node using the...
virtual String get_BaseURI()=0
When overridden in a derived class, gets the base URI for the current node.
virtual bool MoveToNext(XPathNodeType type)
Moves the XPathNavigator to the next sibling node of the current node that matches the XPathNodeType ...
virtual SharedPtr< XPathNavigator > Clone()=0
When overridden in a derived class, creates a new XPathNavigator positioned at the same node as this ...
virtual void InsertAfter(SharedPtr< XPathNavigator > newSibling)
Creates a new sibling node after the currently selected node using the nodes in the XPathNavigator ob...
virtual void InsertBefore(SharedPtr< XPathNavigator > newSibling)
Creates a new sibling node before the currently selected node using the nodes in the XPathNavigator s...
TypeInfo get_ValueType() override
Returns the type of the current node.
virtual void set_InnerXml(String value)
Sets the markup representing the child nodes of the current node.
virtual SharedPtr< XmlNameTable > get_NameTable()=0
When overridden in a derived class, gets the XmlNameTable of the XPathNavigator.
virtual bool MoveToNext(String localName, String namespaceURI)
Moves the XPathNavigator to the next sibling node with the local name and namespace URI specified.
virtual SharedPtr< XPathNodeIterator > Select(String xpath)
Selects a node set, using the specified XPath expression.
virtual bool MoveToFirstAttribute()=0
When overridden in a derived class, moves the XPathNavigator to the first attribute of the current no...
virtual void DeleteSelf()
Deletes the current node and its child nodes.
virtual void InsertElementAfter(String prefix, String localName, String namespaceURI, String value)
Creates a new sibling element after the current node using the namespace prefix, local name and names...
virtual String get_Name()=0
When overridden in a derived class, gets the qualified name of the current node.
virtual bool MoveToId(String id)=0
When overridden in a derived class, moves to the node that has an attribute of type ID whose value ma...
virtual SharedPtr< XPathNavigator > SelectSingleNode(SharedPtr< XPathExpression > expression)
Selects a single node in the XPathNavigator using the specified XPathExpression object.
virtual bool Matches(SharedPtr< XPathExpression > expr)
Determines whether the current node matches the specified XPathExpression.
virtual SharedPtr< XmlReader > ReadSubtree()
Returns an XmlReader object that contains the current node and its child nodes.
virtual void InsertAfter(String newSibling)
Creates a new sibling node after the currently selected node using the XML string specified.
virtual bool MoveToFollowing(String localName, String namespaceURI, SharedPtr< XPathNavigator > end)
Moves the XPathNavigator to the element with the local name and namespace URI specified,...
SharedPtr< Object > get_TypedValue() override
Returns the current node as a boxed object of the most appropriate type.
bool get_IsNode() override
Returns a value that indicates if the current node represents an XPath node.
virtual bool MoveTo(SharedPtr< XPathNavigator > other)=0
When overridden in a derived class, moves the XPathNavigator to the same position as the specified XP...
virtual void SetTypedValue(SharedPtr< Object > typedValue)
Sets the typed value of the current node.
virtual bool MoveToFollowing(XPathNodeType type)
Moves the XPathNavigator to the following element of the XPathNodeType specified in document order.
virtual void AppendChild(String newChild)
Creates a new child node at the end of the list of child nodes of the current node using the XML data...
virtual bool get_IsEmptyElement()=0
When overridden in a derived class, gets a value that indicates whether the current node is an empty ...
virtual String get_LocalName()=0
When overridden in a derived class, gets the XPathNavigator::get_Name of the current node without any...
virtual SharedPtr< XPathNodeIterator > SelectAncestors(XPathNodeType type, bool matchSelf)
Selects all the ancestor nodes of the current node that have a matching XPathNodeType.
virtual void InsertAfter(SharedPtr< XmlReader > newSibling)
Creates a new sibling node after the currently selected node using the XML contents of the XmlReader ...
virtual String get_NamespaceURI()=0
When overridden in a derived class, gets the namespace URI of the current node.
virtual void ReplaceSelf(SharedPtr< XPathNavigator > newNode)
Replaces the current node with the contents of the XPathNavigator object specified.
virtual bool IsDescendant(SharedPtr< XPathNavigator > nav)
Determines whether the specified XPathNavigator is a descendant of the current XPathNavigator.
virtual bool MoveToFirstNamespace(XPathNamespaceScope namespaceScope)=0
When overridden in a derived class, moves the XPathNavigator to the first namespace node that matches...
virtual void InsertBefore(String newSibling)
Creates a new sibling node before the currently selected node using the XML string specified.
virtual bool MoveToNamespace(String name)
Moves the XPathNavigator to the namespace node with the specified namespace prefix.
virtual bool MoveToFirst()
Moves the XPathNavigator to the first sibling node of the current node.
virtual void InsertElementBefore(String prefix, String localName, String namespaceURI, String value)
Creates a new sibling element before the current node using the namespace prefix, local name,...
virtual SharedPtr< XPathNodeIterator > Select(String xpath, SharedPtr< IXmlNamespaceResolver > resolver)
Selects a node set using the specified XPath expression with the IXmlNamespaceResolver object specifi...
virtual bool get_HasAttributes()
Returns a value that indicates whether the current node has any attributes.
virtual String get_OuterXml()
Returns the markup representing the opening and closing tags of the current node and its child nodes.
virtual bool MoveToChild(String localName, String namespaceURI)
Moves the XPathNavigator to the child node with the local name and namespace URI specified.
virtual bool MoveToFirstChild()=0
When overridden in a derived class, moves the XPathNavigator to the first child node of the current n...
int64_t get_ValueAsLong() override
Returns the current node's value as an Int64.
virtual SharedPtr< XmlWriter > PrependChild()
Returns an XmlWriter object used to create a new child node at the beginning of the list of child nod...
static SharedPtr< Collections::Generic::IEqualityComparer< SharedPtr< XPathNavigator > > > get_NavigatorComparer()
Returns an Collections::IEqualityComparer used for equality comparison of XPathNavigator objects.
virtual void ReplaceSelf(String newNode)
Replaces the current node with the content of the string specified.
virtual void InsertBefore(SharedPtr< XmlReader > newSibling)
Creates a new sibling node before the currently selected node using the XML contents of the XmlReader...
int32_t get_ValueAsInt() override
Returns the current node's value as an Int32.
virtual SharedPtr< XPathExpression > Compile(String xpath)
Compiles a string representing an XPath expression and returns an XPathExpression object.
virtual void PrependChild(SharedPtr< XmlReader > newChild)
Creates a new child node at the beginning of the list of child nodes of the current node using the XM...
virtual void MoveToRoot()
Moves the XPathNavigator to the root node that the current node belongs to.
virtual SharedPtr< XmlWriter > ReplaceRange(SharedPtr< XPathNavigator > lastSiblingToReplace)
Replaces a range of sibling nodes from the current node to the node specified.
virtual void CreateAttribute(String prefix, String localName, String namespaceURI, String value)
Creates an attribute node on the current element node using the namespace prefix, local name and name...
virtual SharedPtr< System::Xml::Schema::IXmlSchemaInfo > get_SchemaInfo()
Returns the schema information that has been assigned to the current node as a result of schema valid...
virtual void ReplaceSelf(SharedPtr< XmlReader > newNode)
Replaces the current node with the contents of the XmlReader object specified.
virtual String GetAttribute(String localName, String namespaceURI)
Returns the value of the attribute with the specified local name and namespace URI.
virtual void AppendChild(SharedPtr< XmlReader > newChild)
Creates a new child node at the end of the list of child nodes of the current node using the XML cont...
String ToString() const override
Returns the text value of the current node.
String LookupNamespace(const String &prefix) override
Returns the namespace URI for the specified prefix.
virtual bool MoveToFollowing(String localName, String namespaceURI)
Moves the XPathNavigator to the element with the local name and namespace URI specified in document o...
virtual SharedPtr< XPathNodeIterator > SelectDescendants(String name, String namespaceURI, bool matchSelf)
Selects all the descendant nodes of the current node with the local name and namespace URI specified.
virtual bool CheckValidity(SharedPtr< System::Xml::Schema::XmlSchemaSet > schemas, System::Xml::Schema::ValidationEventHandler validationEventHandler)
Verifies that the XML data in the XPathNavigator conforms to the XML Schema definition language (XSD)...
virtual XPathNodeType get_NodeType()=0
When overridden in a derived class, gets the XPathNodeType of the current node.
virtual SharedPtr< XPathNodeIterator > SelectChildren(XPathNodeType type)
Selects all the child nodes of the current node that have the matching XPathNodeType.
virtual void SetValue(String value)
Sets the value of the current node.
bool MoveToFirstNamespace()
Moves the XPathNavigator to first namespace node of the current node.
DateTime get_ValueAsDateTime() override
Returns the current node's value as a DateTime.
virtual SharedPtr< XPathNodeIterator > Select(SharedPtr< XPathExpression > expr)
Selects a node set using the specified XPathExpression.
String LookupPrefix(const String &namespaceURI) override
Returns the prefix declared for the specified namespace URI.
virtual SharedPtr< Object > get_UnderlyingObject()
Used by XPathNavigator implementations which provide a "virtualized" XML view over a store,...
virtual SharedPtr< Object > Evaluate(String xpath)
Evaluates the specified XPath expression and returns the typed result.
bool MoveToNextNamespace()
Moves the XPathNavigator to the next namespace node.
SharedPtr< Object > ValueAs(const TypeInfo &returnType, SharedPtr< IXmlNamespaceResolver > nsResolver) override
Returns the current node's value as the Type specified, using the IXmlNamespaceResolver object specif...
Provides an iterator over a selected set of nodes.
Definition: xpath_node_iterator.h:45
@ TypeInfo
Specifies that the member is a type.
System::MulticastDelegate< void(SharedPtr< Object >, SharedPtr< ValidationEventArgs >)> ValidationEventHandler
Represents the callback method that will handle XML schema validation events and the ValidationEventA...
Definition: validation_event_handler.h:33
XPathNamespaceScope
Defines the namespace scope.
Definition: xpath_namespace_scope.h:17
XPathNodeType
Defines the XPath node types that can be returned from the XPathNavigator class.
Definition: xpath_node_type.h:17
XmlNodeOrder
Describes the document order of a node compared to a second node.
Definition: xml_node_order.h:15
@ Schema
Validate according to XML Schema definition language (XSD) schemas, including inline XML Schemas....
@ Xml
Serialize according to the XML 1.0 rules.
XmlNamespaceScope
Defines the namespace scope.
Definition: xml_namespace_scope.h:15
Definition: db_command.h:9
@ DateTime
A type representing a date and time value.