Represents an XML document. Objects of this class should only be allocated using System::MakeObject() function. Never create instance of this type on stack or using operator new, as it will result in runtime errors and/or assertion faults. Always wrap this class into System::SmartPtr pointer and use this pointer to pass it to functions as argument.
More...
|
| XmlDocument () |
| Default constructor. Constructs a new instance of XmlDocument class. More...
|
|
| XmlDocument (xmlDoc *native) |
| Constructs a new instance of XmlDocument class that represents the specified XML document. More...
|
|
| XmlDocument (const XmlNameTable::Ptr &nameTable) |
| Constructs a new instance of XmlDocument class that uses the specified. More...
|
|
void | Load (const String &filename) |
| Loads an XML document from the specified URL; URL can be a file or an HTTP URL. More...
|
|
void | Load (const SharedPtr< System::IO::Stream > &stream) |
| Loads an XML document from the specified stream. More...
|
|
void | Load (const SharedPtr< System::IO::TextReader > &reader) |
| Loads an XML document from the specified TextReader object. More...
|
|
void | Load (const SharedPtr< XmlReader > &reader) |
| Loads an XML document from the specified XmlReader object. More...
|
|
void | LoadXml (const String &xml) |
| Loads an XML document from the specified string. More...
|
|
void | Validate (const Schema::ValidationEventHandler &event_handler) |
|
void | Save (const String &filename) const |
| Saves the XML document represented by the current object to the specified file. More...
|
|
void | Save (const SharedPtr< System::IO::Stream > &stream) const |
| Saves the XML document represented by the current object to the specified stream. More...
|
|
void | Save (const SharedPtr< System::IO::TextWriter > &writer) const |
| Saves the XML document represented by the current object to the specified TextWriter object. More...
|
|
void | Save (const SharedPtr< XmlWriter > &writer) const |
| Saves the XML document represented by the current object to the specified XmlWriter object. More...
|
|
String | get_BaseURI () const override |
| Gets the base URI of the current document. More...
|
|
String | get_Name () const override |
| Returns the name of the node represented by the current object. More...
|
|
String | get_Value () const override |
| Returns the value of the XML node represented by the current object. More...
|
|
String | get_OuterXml () const override |
| Returns the XML markup of the XML node represented by the current object and all its child nodes. More...
|
|
XmlNode::Ptr | get_FirstChild () const override |
| Returns the first child of the node represented by the current object. More...
|
|
XmlNode::Ptr | get_LastChild () const override |
| Returns the last child of the node represented by the current object. More...
|
|
XmlNode::Ptr | get_NextSibling () const override |
| Returns the next sibling of the node represented by the current object. More...
|
|
XmlNode::Ptr | get_PreviousSibling () const override |
| Returns the previous sibling of the node represented by the current object. More...
|
|
XmlNode::Ptr | get_ParentNode () const override |
| Returns the parent node of the node represented by the current object. More...
|
|
SharedPtr< XmlDocument > | get_OwnerDocument () const override |
| Returns a shared pointer to an XmlDocument object representing an XML document node to which the node represented by the current object belongs. More...
|
|
XmlElement::Ptr | get_DocumentElement () |
| Returns the root XmlElement of the XML document node represented by the current object. More...
|
|
XmlNameTable::Ptr | get_NameTable () |
| Returns the XmlNameTable object associated with the current object. More...
|
|
bool | get_PreserveWhitespace () const |
| Returns a value indicating whether to preserve insignificant white spaces in XML content. More...
|
|
XmlDocumentType::Ptr | get_DocumentType () const |
| Gets the node containing the DOCTYPE declaration. More...
|
|
void | set_InnerText (String text) override |
| NOT APPLICABLE. More...
|
|
void | set_PreserveWhitespace (bool value) |
| Sets a value indicating whether to preserve insignificant white spaces in XML content. More...
|
|
XmlElement::Ptr | idx_get (String name) const override |
| Returns an XmlElement object representing an XML element with the specified name which is a child of the node represented by the current object. More...
|
|
virtual void | WriteContentTo (SharedPtr< XmlWriter > writer) override |
| Saves all children of the XML document node represented by the current object to the specified XmlWriter object. More...
|
|
virtual void | WriteTo (SharedPtr< XmlWriter > writer) override |
| Saves the XML document node represented by the current object to the specified XmlWriter object. More...
|
|
virtual SharedPtr< XmlAttribute > | CreateAttribute (const String &name) |
| Creates an attribute with the specified name. More...
|
|
virtual SharedPtr< XmlAttribute > | CreateAttribute (const String &qualifiedName, const String &namespaceURI) |
| Creates an attribute with the specified qualified name and namespace URI. More...
|
|
virtual SharedPtr< XmlAttribute > | CreateAttribute (const String &prefix, const String &localName, const String &namespaceURI) |
| Creates an attribute with the specified prefix, local name and namespace URI. More...
|
|
SharedPtr< XmlNode > | CreateNode (XmlNodeType type, const String &qname, const String &namespaceURI=u"") |
| Creates an XmlNode object representing an XML node of the specified type with the specified qualified name and namespace URI. More...
|
|
SharedPtr< XmlElement > | CreateElement (const String &qname) |
| Creates an XmlElement object representing an XML element with the specified qualified name. More...
|
|
SharedPtr< XmlElement > | CreateElement (const String &qualifiedName, const String &namespaceURI) |
| Creates an XmlElement object representing an XML element with the specified qualified name and namespace URI. More...
|
|
virtual SharedPtr< XmlElement > | CreateElement (const String &prefix, const String &localName, const String &namespaceURI) |
| Creates an XmlElement object representing an XML element with the specified prefix, local name and namespace URI. More...
|
|
SharedPtr< XmlText > | CreateTextNode (const String &text) |
| Creates an XmlText object representing an XML text node with the specified content. More...
|
|
SharedPtr< XmlComment > | CreateComment (const String &text) |
| Creates an XmlComment object representing an XML comment node with the specified content. More...
|
|
SharedPtr< XmlDeclaration > | CreateXmlDeclaration (const String &version, const String &encoding=u"", const String &standalone=u"") |
| Creates an XmlDeclaration object representing an XML declaration node with the specified values of 'version', 'encoding' and 'standalone' attributes. More...
|
|
SharedPtr< XmlProcessingInstruction > | CreateProcessingInstruction (const String &target, const String &data) |
| Creates an XmlProcessingInstruction object representing an XML processing instruction node with the specified values of 'target' and 'data' attributes. More...
|
|
SharedPtr< XmlCDataSection > | CreateCDataSection (const String &data) |
| Creates an XmlCDataSection object representing an XML CDATA section node with the specified content. More...
|
|
SharedPtr< XmlDocumentFragment > | CreateDocumentFragment () |
| Creates an XmlDocumentFragment object. More...
|
|
System::SharedPtr< XmlSignificantWhitespace > | CreateSignificantWhitespace (String text) |
| Creates an XmlSignificantWhitespace object. More...
|
|
System::SharedPtr< XmlWhitespace > | CreateWhitespace (String text) |
| Creates an XmlWhitespace object. More...
|
|
System::SharedPtr< XmlAttribute > | CreateDefaultAttribute (String prefix, String localName, String namespaceURI) |
| Creates attribute with default value. More...
|
|
SharedPtr< XmlNode > | ImportNode (const SharedPtr< XmlNode > &node, bool deep) |
| Imports the specified XML node from another XML document. More...
|
|
XmlNode::Ptr | AppendChild (XmlNode::Ptr child) override |
| Adds the specified XML node at the end of the list of children of the XML document represented by the current object. More...
|
|
XmlNode::Ptr | PrependChild (XmlNode::Ptr child) override |
| Adds the specified XML node at the beginning of the list of children of the XML document represented by the current object. More...
|
|
XmlNode::Ptr | InsertBefore (XmlNode::Ptr child, XmlNode::Ptr ref_child) override |
| Adds the specified XML node to the list of children of the XML document represented by the current object at the position prior to the position of the specified reference child node. More...
|
|
XmlNode::Ptr | InsertAfter (XmlNode::Ptr child, XmlNode::Ptr ref_child) override |
| Adds the specified XML node to the list of children of the XML document represented by the current object at the position next to the position of the specified reference child node. More...
|
|
XmlNode::Ptr | RemoveChild (XmlNode::Ptr child) override |
| Removes the specified XML node from the list of children of the XML document represented by the current object. More...
|
|
SharedPtr< XmlNodeList > | SelectNodes (String xpath) override |
| Returns a list of XML nodes that match the specfied XPath expression. More...
|
|
SharedPtr< XmlNodeList > | SelectNodes (String xpath, SharedPtr< XmlNamespaceManager > nsmgr) override |
| Returns a list of XML nodes that match the specfied XPath expression; any prefixes encountered in xpath expression are resolved using the specified namespace manager. More...
|
|
SharedPtr< XmlNode > | SelectSingleNode (String xpath, SharedPtr< XmlNamespaceManager > nsmgr=nullptr) override |
| Returns the first XML node that match the specfied XPath expression; any prefixes encountered in xpath expression are resolved using the specified namespace manager. More...
|
|
SharedPtr< XmlNodeList > | GetElementsByTagName (const String &name) |
| Returns a list of XmlNode objects representing the XML elements whose qualified name matches the specifed value. More...
|
|
SharedPtr< XmlNodeList > | GetElementsByTagName (const String &localName, const String &namespaceURI) |
| Returns a list of XmlNode objects representing the XML elements whose local name and namespace URI match the specifed values. More...
|
|
SharedPtr< XmlElement > | GetElementById (const String &elementId) |
| NOT IMPLEMENTED. More...
|
|
SharedPtr< XPath::XPathNavigator > | CreateNavigator () override |
| Creates an instance of XPath::XPathNavigator class for navigating an XML document represented by the current object. More...
|
|
virtual XmlNode::Ptr | CloneNode (bool deep) override |
| NOT IMPLEMENTED. More...
|
|
xmlDoc * | native_doc () const |
| Retirns a pointer to the underlying xmlDoc object. More...
|
|
void | set_XmlResolver (const SharedPtr< XmlResolver > &value) |
| Sets the XML Resolver object used to access external XML documents. More...
|
|
void | set_Schemas (const SharedPtr< Schema::XmlSchemaSet > &value) |
|
virtual XmlNode::Ptr | ReadNode (const SharedPtr< XmlReader > reader) |
| Reads node from XmlReader. More...
|
|
void | SetBaseURI (const String &base_uri) |
|
virtual XmlNodeType | get_NodeType () const |
| Returns the type of the XML node represented by the current object. More...
|
|
virtual String | get_LocalName () const |
| Returns the local name of the XML node represented by the current object. More...
|
|
virtual String | get_Prefix () const |
| Returns the prefix of the XML node represented by the current object. More...
|
|
virtual String | get_NamespaceURI () const |
| Returns the namespace URI of the XML node represented by the current object. More...
|
|
virtual String | get_InnerText () const |
| Returns the concatenated values of the XML node represented by the current object and all its child nodes. More...
|
|
virtual String | get_InnerXml () const |
| Returns the XML markup representing the child nodes of the XML node represented by the current object. More...
|
|
virtual bool | get_HasChildNodes () const |
| Determines if the XML node represented by the current object has child nodes. More...
|
|
virtual SharedPtr< XmlAttributeCollection > | get_Attributes () |
| Returns an XmlAttributeCollection object containing all attributes of the XML node represented by the current object. More...
|
|
virtual SharedPtr< XmlNodeList > | get_ChildNodes () |
| Returns an XmlNodeList object containing all child nodes of the XML node represented by the current object. More...
|
|
virtual SharedPtr< Schema::IXmlSchemaInfo > | get_SchemaInfo () |
|
virtual void | set_Value (String value) |
| Sets the value of the node represented by the current object. More...
|
|
virtual void | set_Prefix (String) |
| Sets the prefix of the XML node represented by the current object. More...
|
|
virtual void | set_InnerXml (String value) |
| Replaces the XML node's inner XML markup with the contents of the specified string. More...
|
|
virtual SharedPtr< XmlElement > | operator[] (String name) const |
| Returns a shared pointer to the XmlElement object representing the child element of the XML node represented by the current object with the specified qualified name. More...
|
|
virtual XmlNode::Ptr | ReplaceChild (XmlNode::Ptr new_child, XmlNode::Ptr old_child) |
| Replaces the specified the specified child node of the node reprsented by the current object with another one. More...
|
|
virtual void | RemoveAll () |
| Removes all child nodes of the XML node reprsented by the current object. More...
|
|
virtual String | GetPrefixOfNamespace (const String &namespace_uri) |
| Looks up the closest xmlns declaration for the specified namespace URI that is in scope for the XML node represented by the current object and returns the prefix defined in that declaration. More...
|
|
virtual String | GetNamespaceOfPrefix (const String &prefix) |
| Looks up the closest xmlns declaration for the specified prefix that is in scope for the XML node represented by the current object and returns the namespace URI defined in that declaration. More...
|
|
virtual XmlNode::Ptr | SelectSingleNode (String xPath) |
| Returns the first XML node that match the specfied XPath expression. More...
|
|
SharedPtr< System::Collections::Generic::IEnumerator< XmlNode::Ptr > > | GetEnumerator () |
| Returns an enumerator that points to the collection containing child nodes of the node represented by the current object. More...
|
|
XmlNode::Ptr | Clone () |
| Returns a copy of the node represented by the current object. The subtree under the node is also copied. This method is equivallent to calling CloneNode(true). More...
|
|
xmlNode * | native_node () |
| Returns a pointer to the underlying libxml2 xmlNode object. More...
|
|
virtual void | Normalize () |
| Puts all XmlText nodes in the full depth of the sub-tree underneath this XmlNode into a "normal" form where only markup (that is, tags, comments, processing instructions, CDATA sections, and entity references) separates XmlText nodes, that is, there are no adjacent XmlText nodes. Not implemented. More...
|
|
| Object () |
| Creates object. Initializes all internal data structures. More...
|
|
virtual | ~Object () |
| Destroys object. Frees all internal data structures. More...
|
|
| Object (Object const &x) |
| Copy constructor. Doesn't copy anything, really, just initializes new object and enables copy constructing subclasses. More...
|
|
Object & | operator= (Object const &x) |
| Assignment operator. Doesn't copy anything, really, just initializes new object and enables copy constructing subclasses. More...
|
|
Object * | SharedRefAdded () |
| Increments shared reference count. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More...
|
|
int | SharedRefRemovedSafe () |
| Decrements and returns shared reference count. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More...
|
|
int | RemovedSharedRefs (int count) |
| Decreases shared reference count by specified value. More...
|
|
Detail::SmartPtrCounter * | WeakRefAdded () |
| Increments weak reference count. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More...
|
|
void | WeakRefRemoved () |
| Decrements weak reference count. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More...
|
|
Detail::SmartPtrCounter * | GetCounter () |
| Gets reference counter data structure associated with the object. More...
|
|
int | SharedCount () const |
| Gets current value of shared reference counter. More...
|
|
void | Lock () |
| Implements C# lock() statement locking. Call directly or use LockContext sentry object. More...
|
|
void | Unlock () |
| Implements C# lock() statement unlocking. Call directly or use LockContext sentry object. More...
|
|
virtual bool | Equals (ptr obj) |
| Compares objects using C# Object.Equals semantics. More...
|
|
virtual int32_t | GetHashCode () const |
| Analog of C# Object.GetHashCode() method. Enables hashing of custom objects. More...
|
|
virtual String | ToString () const |
| Analog of C# Object.ToString() method. Enables converting custom objects to string. More...
|
|
virtual ptr | MemberwiseClone () const |
| Analog of C# Object.MemberwiseClone() method. Enables cloning custom types. More...
|
|
virtual const TypeInfo & | GetType () const |
| Gets actual type of object. Analog of C# System.Object.GetType() call. More...
|
|
virtual bool | Is (const TypeInfo &targetType) const |
| Check if object represents an instance of type described by targetType. Analog of C# 'is' operator. More...
|
|
virtual void | SetTemplateWeakPtr (uint32_t argument) |
| Set n'th template argument a weak pointer (rather than shared). Allows switching pointers in containers to weak mode. More...
|
|
virtual bool | FastCast (const Details::FastRttiBase &helper, void **out_ptr) const |
| For internal purposes only. More...
|
|
template<> |
bool | ReferenceEquals (String const &str, std::nullptr_t) |
| Specialization of Object::ReferenceEquals for case of string and nullptr. More...
|
|
template<> |
bool | ReferenceEquals (String const &str1, String const &str2) |
| Specialization of Object::ReferenceEquals for case of strings. More...
|
|
|
| ~XmlDocument () override |
| Destructor. More...
|
|
void | onNodeInserting (const XmlNode::Ptr &node, const XmlNode::Ptr &newParent) |
| Triggers NodeInserting event. More...
|
|
void | onNodeInserted (const XmlNode::Ptr &node, const XmlNode::Ptr &newParent) |
| Triggers NodeInserted event. More...
|
|
void | onNodeRemoving (const XmlNode::Ptr &node, const XmlNode::Ptr &oldParent) |
| Triggers NodeRemoving event. More...
|
|
void | onNodeRemoved (const XmlNode::Ptr &node, const XmlNode::Ptr &oldParent) |
| Triggers NodeRemoved event. More...
|
|
void | onNodeChanging (const XmlNode::Ptr &node, const XmlNode::Ptr &parent, const String &oldValue, const String &newValue) |
| Triggers NodeChanging event. More...
|
|
void | onNodeChanged (const XmlNode::Ptr &node, const XmlNode::Ptr &parent, const String &oldValue, const String &newValue) |
| Triggers NodeChanged event. More...
|
|
SharedPtr< XmlAttribute > | CreateAttributeWithValue (const String &qname, const String &value) |
| Creates an XML attribute with the specified qualified name and value. More...
|
|
| ~XmlNode () override |
| Destructor. More...
|
|
| XmlNode (xmlNode *node) |
| Constructs an instance of XmlNode class that represents the specified XML node. More...
|
|
| XmlNode (xmlNode *node, const SharedPtr< XmlDocument > &owner) |
| Constructs an instance of XmlNode class that represents the specified XML node and belongs to the specified owner XML document. More...
|
|
| XmlNode (const SharedPtr< XmlDocument > &owner) |
| Constructs an instance of XmlNode class that belongs to the specified document. The underlying libxml2 xmlNode object is not created. This constructor is intended to be used by XmlDeclaration class only. More...
|
|
SharedPtr< XmlElement > | find_child_xml_element_by_name (const String &name, const SharedPtr< XmlDocument > &owner_doc) const |
| Looks up an XML element with the specified name which is a descandant of the specified XML document. More...
|
|
uint64_t | child_elements_count () const |
| Returns the number of children of all levels of the XML node represented by the current object. More...
|
|
bool | can_be_append (XmlNodeType type) const |
| Determines if an XML node of the specified type can be added as a child node to the XML node represented by the current object. More...
|
|
insert_where | noralize_place (xmlNode *ref_child, insert_where place) |
| Normalizes the indicator of the position where the node is to be inserted by making it consistent with the reference child value and presence of nodes in the list of children of the current node. More...
|
|
void | insert_verified_child_node (const XmlNode::Ptr &child, xmlNode *ref_child, insert_where place) |
| Inserts the specified node in the list of children of the node represented by the current object at the specified position. More...
|
|
void | insert_document_fragment (const XmlNode::Ptr &fragment, xmlNode *ref_child, insert_where place) |
| Inserts the nodes of the specified document fragment in the list of children of the node represented by the current object at the specified position. More...
|
|
void | reassign_native (xmlNode *node) |
| Replaces the node reprsented by the current object with the specified one. More...
|
|
xmlAttr * | get_attribute_by_qname (const String &qname) const |
| Returns an attribute with the specified qualified name. More...
|
|
xmlNs * | find_ns (const std::string &prefix) const |
| Returns a namespace associated with the specified prefix. More...
|
|
void | set_Value (const String &text, bool riseEvent) |
| Sets the value of the XML node represented by the current object and triggers corresponding events. More...
|
|
|
static bool | ReferenceEquals (ptr const &objA, ptr const &objB) |
| Compares objects by reference. More...
|
|
template<typename T > |
static std::enable_if<!IsSmartPtr< T >::value, bool >::type | ReferenceEquals (T const &objA, T const &objB) |
| Compares objects by reference. More...
|
|
template<typename T > |
static std::enable_if<!IsSmartPtr< T >::value, bool >::type | ReferenceEquals (T const &objA, std::nullptr_t) |
| Reference-compares value type object with nullptr. More...
|
|
template<typename T1 , typename T2 > |
static std::enable_if< IsSmartPtr< T1 >::value &&IsSmartPtr< T2 >::value, bool >::type | Equals (T1 const &objA, T2 const &objB) |
| Compares reference type objects in C# style. More...
|
|
template<typename T1 , typename T2 > |
static std::enable_if<!IsSmartPtr< T1 >::value &&!IsSmartPtr< T2 >::value, bool >::type | Equals (T1 const &objA, T2 const &objB) |
| Compares value type objects in C# style. More...
|
|
static const TypeInfo & | Type () |
| Implements C# typeof(System.Object) construct. More...
|
|
template<> |
bool | Equals (float const &objA, float const &objB) |
| Emulates C#-style floating point comparison where two NaNs are considered equal even though according to IEC 60559:1989 NaN is not equal to any value, including NaN. More...
|
|
template<> |
bool | Equals (double const &objA, double const &objB) |
| Emulates C#-style floating point comparison where two NaNs are considered equal even though according to IEC 60559:1989 NaN is not equal to any value, including NaN. More...
|
|
enum | insert_where { insert_begin
, insert_before
, insert_after
, insert_end
} |
| Specifies the position in the child nodes list where to insert a node during insertion operation. More...
|
|
static xmlNs * | make_new_ns (xmlNodePtr parent, const std::string &prefix, const std::string &uri="") |
| Creates a new namespace. More...
|
|
static int | parse_qname (const System::String &qname, std::string &prefix, std::string &local_name) |
| Parses the XML node's qualified name by breaking it into a prefix and a local name. More...
|
|
static int | csharp_nodetype_to_libxml (XmlNodeType type) |
| Converts the specified XML node type represented as an XmlNodeType value to equivalent value defied by libxml2 library. More...
|
|
static XmlNode::Ptr | create_wrapper (xmlNode *node, const SharedPtr< XmlDocument > &owner, const std::shared_ptr< xmlDoc > &doc=nullptr) |
| Creates an instance of XmlNode class that represents the specified node and belongs to the specified document. More...
|
|
static SharedPtr< XmlAttribute > | create_wrapper_attr (xmlAttr *attr, const SharedPtr< XmlDocument > &owner) |
| Creates an instance of XmlAttribute class that represents the specified attribute and belongs to the specified document. More...
|
|
static SharedPtr< XmlAttribute > | create_wrapper_attr (xmlNs *ns, const SharedPtr< XmlDocument > &owner, const SharedPtr< XmlElement > &element) |
| Creates an instance of XmlAttribute class that represents an xmlns attribute and belongs to the specified document. More...
|
|
static SharedPtr< XmlAttribute > | create_wrapper_attr (const String &prefix, const String &local_name, const String &namespace_uri, const SharedPtr< XmlDocument > &owner) |
| Constructs an XmlAttribute object that represents a detached XML attribute belonging to the specified owner. More...
|
|
template<typename T > |
static SharedPtr< T > | create_aliasing_wrapper (const SharedPtr< T > &ptr, const SharedPtr< XmlDocument > &document) |
| Creates a shared pointer for pointee to an XML-node with aliasing constructor to own a document. More...
|
|