Asposecpplib

Represents an XML element node. 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...

Inherits System::Xml::XmlNode.

Public Types

typedef SharedPtr< XmlElementPtr
 An alias for shared pointer to an instance of this class. More...
 
- Public Types inherited from System::Xml::XmlNode
typedef SharedPtr< XmlNodePtr
 An alias for shared pointer to an instance of this class. More...
 
- Public Types inherited from System::Object
typedef SmartPtr< Objectptr
 Alias for smart pointer type. More...
 

Public Member Functions

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_LocalName () const override
 Returns the local name of the node represented by the current object. More...
 
String get_Prefix () const override
 Returns the prefix of the node represented by the current object. More...
 
String get_NamespaceURI () const override
 Returns the namespace URI of the node represented by the current object. More...
 
XmlAttributeCollection::Ptr get_Attributes () override
 Returns an XmlAttributeCollection object containing all attributes of the XML element represented by the current object. More...
 
bool get_HasAttributes () const
 Determines if the XML element represented by the current object has any attributes. More...
 
bool get_IsEmpty () const
 Determines if the XML element represented by the current object has any attributes or child nodes. More...
 
XmlElement::Ptr idx_get (String name) const override
 Looks for a child XML element with the specified name. More...
 
void set_Prefix (String value) override
 Sets the specified value as a prefix for the XML element represented by the current object. More...
 
XmlNode::Ptr AppendChild (XmlNode::Ptr new_child) override
 Adds the specified XML node at the end of the list of children of the XML element represented by the current object. More...
 
XmlNode::Ptr PrependChild (XmlNode::Ptr new_child) override
 Adds the specified XML node at the beginning of the list of children of the XML element 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 element 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 element represented by the current object at the position next to the position of the specified reference child node. More...
 
XmlAttribute::Ptr GetAttributeNode (const String &name) const
 Returns an XmlAttribute object representing an XML attribute of the XML element represented by the current object with the specified name. More...
 
String GetAttribute (const String &name) const
 Returns the value of the attribute of the XML element represented by the current object with the specified name. More...
 
String GetAttribute (const String &localName, const String &namespaceURI) const
 Returns the name of the attribute of the XML element represented by the current object with the specified local name and namespace URI. More...
 
SharedPtr< XmlNodeListGetElementsByTagName (const String &name)
 Returns descendant elements whose qualified names match the specified value. More...
 
SharedPtr< XmlNodeListGetElementsByTagName (const String &localName, const String &namespaceURI)
 Returns descendant elements whose local names and namespace URIs match the specified values. More...
 
bool HasAttribute (const String &qname) const
 Determines if the XML element represented by the current object has an attribute with the specified qualified name. More...
 
bool HasAttribute (const String &localName, const String &namespaceURI) const
 Determines if the XML element represented by the current object has an attribute with the specified local name and namespace URI. More...
 
void SetAttribute (const String &name, const String &value)
 Sets the specified value to the attribute with the specified qualified name. If the attribut that matches the specified criteria does not exist, it is created. More...
 
void SetAttribute (const String &localName, const String &namespaceURI, const String &value)
 Sets the specified value to the attribute with the specified local name and namespace URI. If the attribut that matches the specified criteria does not exist, it is created. More...
 
XmlAttribute::Ptr SetAttributeNode (const XmlAttribute::Ptr &attribute)
 Attaches the specified attribute to the XML element represented by the current object. More...
 
void RemoveAllAttributes ()
 Removes all attributes. More...
 
void RemoveAttribute (const String &qname)
 Removes the attribute with the specified qualified name. More...
 
void RemoveAttribute (const String &loaclName, const String &namespaceURI)
 Removes the attribute with the specified local name and namespace URI. More...
 
XmlNode::Ptr RemoveAttributeAt (int idx)
 Removes the attribute located at the spacified position in the list of attributes af the XML element represented by the current object. More...
 
XmlAttribute::Ptr RemoveAttributeNode (const XmlAttribute::Ptr &attribute)
 Removes the specified attribute from the list of attributes of the XML element represented by the current object. More...
 
XmlAttribute::Ptr RemoveAttributeNode (const String &name)
 Removes the attribute with the specified qualified name from the list of attributes of the XML element represented by the current object. More...
 
void WriteContentTo (SharedPtr< XmlWriter > writer) override
 Saves all children of the node represented by the current object to the specified XmlWiter object. More...
 
void WriteTo (SharedPtr< XmlWriter > writer) override
 Saves the node represented by the current object to the specified XmlWriter. More...
 
XmlNode::Ptr CloneNode (bool deep) override
 Returns a copy of the node represented by the current object. More...
 
- Public Member Functions inherited from System::Xml::XmlNode
virtual String get_BaseURI () const
 NOT IMPLEMENTED. More...
 
virtual XmlNodeType get_NodeType () const
 Returns the type 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 String get_OuterXml () const
 Returns the XML markup representing the XML node represented by the current object and all its the child nodes. More...
 
virtual bool get_HasChildNodes () const
 Determines if the XML node represented by the current object has child nodes. More...
 
virtual XmlNode::Ptr get_FirstChild () const
 Returns the first child of the node represented by the current object. More...
 
virtual XmlNode::Ptr get_LastChild () const
 Returns the last child of the node represented by the current object. More...
 
virtual XmlNode::Ptr get_NextSibling () const
 Returns the next sibling of the node represented by the current object. More...
 
virtual XmlNode::Ptr get_PreviousSibling () const
 Returns the previous sibling of the node represented by the current object. More...
 
virtual XmlNode::Ptr get_ParentNode () const
 Returns the parent node of the node represented by the current object. More...
 
virtual SharedPtr< XmlDocumentget_OwnerDocument () const
 Returns a shared pointer to an XmlDocument object representing an XML document node to which the node represented by the current object belongs. More...
 
virtual SharedPtr< XmlNodeListget_ChildNodes ()
 Returns an XmlNodeList object containing all child nodes of the XML node represented by the current object. More...
 
virtual SharedPtr< Schema::IXmlSchemaInfoget_SchemaInfo ()
 
virtual void set_Value (String value)
 Sets the value of the node represented by the current object. More...
 
virtual void set_InnerText (String value)
 Sets the XML node's inner text by replacing all the child nodes (if any) with the contents of the given string. 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< XmlElementoperator[] (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 XmlNode::Ptr RemoveChild (XmlNode::Ptr child)
 Removes the specified child node of the XML node represented 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 SharedPtr< XmlNodeListSelectNodes (String xPath)
 Returns a list of XML nodes that match the specfied XPath expression. More...
 
virtual SharedPtr< XmlNodeListSelectNodes (String xPath, SharedPtr< XmlNamespaceManager > nsMgr)
 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...
 
virtual XmlNode::Ptr SelectSingleNode (String xPath)
 Returns the first XML node that match the specfied XPath expression. More...
 
virtual XmlNode::Ptr SelectSingleNode (String xPath, SharedPtr< XmlNamespaceManager > nsMgr)
 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< 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 SharedPtr< XPath::XPathNavigatorCreateNavigator () override
 Creates an instance of XPath::XPathNavigator class for navigating an XML document represented by the current 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...
 
- Public Member Functions inherited from System::Object
 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...
 
Objectoperator= (Object const &x)
 Assignment operator. Doesn't copy anything, really, just initializes new object and enables copy constructing subclasses. More...
 
ObjectSharedRefAdded ()
 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 TypeInfoGetType () 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...
 

Protected Member Functions

 ~XmlElement () override
 Destructor. More...
 
 XmlElement (const String &prefix, const String &localName, const String &namespaceURI, const SharedPtr< XmlDocument > &doc)
 Constructs an XmlElement object that represents an XML element with the specified prefix, local name and namespace URI. More...
 
 XmlElement (xmlNode *node, const SharedPtr< XmlDocument > &owner)
 Constructs an XmlElement object that represents the specified libxml2 xmlNode object. More...
 
XmlNode::Ptr internal_insert_child (const XmlNode::Ptr &child, xmlNode *ref_child, insert_where place)
 Inserts the specified XmlNode object into the list of children of the element represented by the current object at the specified position. More...
 
- Protected Member Functions inherited from System::Xml::XmlNode
 ~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< XmlElementfind_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 Protected Member Functions

static String GeneratePrefix (xmlNode *node)
 Generates a namespace prefix based on the values of the specified node's properties. More...
 
- Static Protected Member Functions inherited from System::Xml::XmlNode
static xmlNs * make_new_ns (xmlNodePtr parent, const std::string &prefix, const std::string &uri="")
 Creates a new namespace. More...
 
static void parse_qname (const std::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< XmlAttributecreate_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< XmlAttributecreate_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< XmlAttributecreate_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...
 

Additional Inherited Members

- Static Public Member Functions inherited from System::Object
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 TypeInfoType ()
 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...
 
- Protected Types inherited from System::Xml::XmlNode
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...
 
- Protected Attributes inherited from System::Xml::XmlNode
std::shared_ptr< xmlDoc > m_doc
 XML document to which the XML node represented by the current object belongs. More...
 
xmlNode * m_node
 Pointer to underlying libxml2 xmlNode object. More...
 
WeakPtr< XmlDocumentm_owner
 Weak poiter to the owning XML document. More...
 

Detailed Description

Represents an XML element node. 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.

Member Typedef Documentation

◆ Ptr

An alias for shared pointer to an instance of this class.

Constructor & Destructor Documentation

◆ ~XmlElement()

System::Xml::XmlElement::~XmlElement ( )
overrideprotected

Destructor.

◆ XmlElement() [1/2]

System::Xml::XmlElement::XmlElement ( const String prefix,
const String localName,
const String namespaceURI,
const SharedPtr< XmlDocument > &  doc 
)
protected

Constructs an XmlElement object that represents an XML element with the specified prefix, local name and namespace URI.

Parameters
prefixXML element's prefix
localNameXML element's local name
namespaceURIXML element's namespace URI
docThe XML element's owner document

◆ XmlElement() [2/2]

System::Xml::XmlElement::XmlElement ( xmlNode *  node,
const SharedPtr< XmlDocument > &  owner 
)
protected

Constructs an XmlElement object that represents the specified libxml2 xmlNode object.

Parameters
nodeThe XML element to be represented by the object being constructed
ownerThe XML element's owner document

Member Function Documentation

◆ AppendChild()

XmlNode::Ptr System::Xml::XmlElement::AppendChild ( XmlNode::Ptr  new_child)
overridevirtual

Adds the specified XML node at the end of the list of children of the XML element represented by the current object.

Parameters
new_childThe XML node to add
Returns
A shared pointer to the specified XmlNode object child

Reimplemented from System::Xml::XmlNode.

◆ CloneNode()

XmlNode::Ptr System::Xml::XmlElement::CloneNode ( bool  deep)
overridevirtual

Returns a copy of the node represented by the current object.

Parameters
deepSpecifies whether to clone the subtree under the node represented by the current object (true) or only the node itself (false)
Returns
A shared pointer to an XmlNode object that is a copy of the current object

Implements System::Xml::XmlNode.

◆ GeneratePrefix()

static String System::Xml::XmlElement::GeneratePrefix ( xmlNode *  node)
staticprotected

Generates a namespace prefix based on the values of the specified node's properties.

Parameters
nodeAn xmlNode whose properties to be used to generate a prefix
Returns
The generated namespace prefix

◆ get_Attributes()

XmlAttributeCollection::Ptr System::Xml::XmlElement::get_Attributes ( )
overridevirtual

Returns an XmlAttributeCollection object containing all attributes of the XML element represented by the current object.

Reimplemented from System::Xml::XmlNode.

◆ get_HasAttributes()

bool System::Xml::XmlElement::get_HasAttributes ( ) const

Determines if the XML element represented by the current object has any attributes.

Returns
True if the XML element represented by the current object has at least one attribute, otherwise - false

◆ get_IsEmpty()

bool System::Xml::XmlElement::get_IsEmpty ( ) const

Determines if the XML element represented by the current object has any attributes or child nodes.

Returns
True if the XML element represented by the current object has at least one attribute or at least one child node, otherwise - false

◆ get_LocalName()

String System::Xml::XmlElement::get_LocalName ( ) const
overridevirtual

Returns the local name of the node represented by the current object.

Reimplemented from System::Xml::XmlNode.

◆ get_Name()

String System::Xml::XmlElement::get_Name ( ) const
overridevirtual

Returns the name of the node represented by the current object.

Implements System::Xml::XmlNode.

◆ get_NamespaceURI()

String System::Xml::XmlElement::get_NamespaceURI ( ) const
overridevirtual

Returns the namespace URI of the node represented by the current object.

Reimplemented from System::Xml::XmlNode.

◆ get_Prefix()

String System::Xml::XmlElement::get_Prefix ( ) const
overridevirtual

Returns the prefix of the node represented by the current object.

Reimplemented from System::Xml::XmlNode.

◆ get_Value()

String System::Xml::XmlElement::get_Value ( ) const
overridevirtual

Returns the value of the XML node represented by the current object.

Returns
An empty string

Reimplemented from System::Xml::XmlNode.

◆ GetAttribute() [1/2]

String System::Xml::XmlElement::GetAttribute ( const String localName,
const String namespaceURI 
) const

Returns the name of the attribute of the XML element represented by the current object with the specified local name and namespace URI.

Parameters
localNameThe local name of the attribute
namespaceURIThe namespace URI of the attribute
Returns
The value of the attribute with local name localName and namespace URI namespaceURI

◆ GetAttribute() [2/2]

String System::Xml::XmlElement::GetAttribute ( const String name) const

Returns the value of the attribute of the XML element represented by the current object with the specified name.

Parameters
nameThe name of the attribute
Returns
The value of the attribute with name name

◆ GetAttributeNode()

XmlAttribute::Ptr System::Xml::XmlElement::GetAttributeNode ( const String name) const

Returns an XmlAttribute object representing an XML attribute of the XML element represented by the current object with the specified name.

Parameters
nameThe name of the attribute to return
Returns
An XmlAttribute object representing an XML attribute of the XML element represented by the current object with name name.

◆ GetElementsByTagName() [1/2]

SharedPtr<XmlNodeList> System::Xml::XmlElement::GetElementsByTagName ( const String localName,
const String namespaceURI 
)

Returns descendant elements whose local names and namespace URIs match the specified values.

Parameters
localNameThe string to match elements' local names against
namespaceURIThe string to match elements' namespace URIs against
Returns
An XmlNodeList object containing objects representing XML elements whose local names match localName and namespace URIs match namespaceURI

◆ GetElementsByTagName() [2/2]

SharedPtr<XmlNodeList> System::Xml::XmlElement::GetElementsByTagName ( const String name)

Returns descendant elements whose qualified names match the specified value.

Parameters
nameThe string to match elements' names against
Returns
An XmlNodeList object containing objects representing XML elements whose qualified names match name

◆ HasAttribute() [1/2]

bool System::Xml::XmlElement::HasAttribute ( const String localName,
const String namespaceURI 
) const

Determines if the XML element represented by the current object has an attribute with the specified local name and namespace URI.

Parameters
localNameThe local name of the attribute to look for
namespaceURIThe namespace URI of the attribute to look for
Returns
True if the attribute with the spacified local name and namespace URI is found, otherwise - false

◆ HasAttribute() [2/2]

bool System::Xml::XmlElement::HasAttribute ( const String qname) const

Determines if the XML element represented by the current object has an attribute with the specified qualified name.

Parameters
qnameThe qualified name of the attribute to look for
Returns
True if the attribute with the spacified qualified name is found, otherwise - false

◆ idx_get()

XmlElement::Ptr System::Xml::XmlElement::idx_get ( String  name) const
overridevirtual

Looks for a child XML element with the specified name.

Parameters
nameThe name of the element to look for
Returns
An XmlElement object representing XML element which is a child of the XML element represented by the current object and whos name matches name.

Reimplemented from System::Xml::XmlNode.

◆ InsertAfter()

XmlNode::Ptr System::Xml::XmlElement::InsertAfter ( XmlNode::Ptr  child,
XmlNode::Ptr  ref_child 
)
overridevirtual

Adds the specified XML node to the list of children of the XML element represented by the current object at the position next to the position of the specified reference child node.

Parameters
childThe XML node to add
ref_childThe reference node indicating the position in the list of children prior to which node should be inserted
Returns
A shared pointer to the specified XmlNode object child

Reimplemented from System::Xml::XmlNode.

◆ InsertBefore()

XmlNode::Ptr System::Xml::XmlElement::InsertBefore ( XmlNode::Ptr  child,
XmlNode::Ptr  ref_child 
)
overridevirtual

Adds the specified XML node to the list of children of the XML element represented by the current object at the position prior to the position of the specified reference child node.

Parameters
childThe XML node to add
ref_childThe reference node indicating the position in the list of children prior to which node should be inserted
Returns
A shared pointer to the specified XmlNode object child

Reimplemented from System::Xml::XmlNode.

◆ internal_insert_child()

XmlNode::Ptr System::Xml::XmlElement::internal_insert_child ( const XmlNode::Ptr child,
xmlNode *  ref_child,
insert_where  place 
)
protected

Inserts the specified XmlNode object into the list of children of the element represented by the current object at the specified position.

Parameters
childThe node to insert
ref_childThe reference child node; specifies the insertion position if it is relative to this child node
placeA value that specifies an insertion position either alone or in conjunction with ref_child's position
Returns
A shared pointer to inserted XmlNode object

◆ PrependChild()

XmlNode::Ptr System::Xml::XmlElement::PrependChild ( XmlNode::Ptr  new_child)
overridevirtual

Adds the specified XML node at the beginning of the list of children of the XML element represented by the current object.

Parameters
new_childThe XML node to add
Returns
A shared pointer to the specified XmlNode object child

Reimplemented from System::Xml::XmlNode.

◆ RemoveAllAttributes()

void System::Xml::XmlElement::RemoveAllAttributes ( )

Removes all attributes.

◆ RemoveAttribute() [1/2]

void System::Xml::XmlElement::RemoveAttribute ( const String loaclName,
const String namespaceURI 
)

Removes the attribute with the specified local name and namespace URI.

Parameters
loaclNameThe local name of the attribute to remove
namespaceURIThe namespace URI of the attribute to remove

◆ RemoveAttribute() [2/2]

void System::Xml::XmlElement::RemoveAttribute ( const String qname)

Removes the attribute with the specified qualified name.

Parameters
qnameThe qualified name of the attribute to remove

◆ RemoveAttributeAt()

XmlNode::Ptr System::Xml::XmlElement::RemoveAttributeAt ( int  idx)

Removes the attribute located at the spacified position in the list of attributes af the XML element represented by the current object.

Parameters
idxThe 0-based index of the attribute to remove
Returns
The removed XmlNode object or null-pointer if the node with the specified index does not exist

◆ RemoveAttributeNode() [1/2]

XmlAttribute::Ptr System::Xml::XmlElement::RemoveAttributeNode ( const String name)

Removes the attribute with the specified qualified name from the list of attributes of the XML element represented by the current object.

Parameters
nameThe qualified name of the attribute to remove
Returns
The removed attribute

◆ RemoveAttributeNode() [2/2]

XmlAttribute::Ptr System::Xml::XmlElement::RemoveAttributeNode ( const XmlAttribute::Ptr attribute)

Removes the specified attribute from the list of attributes of the XML element represented by the current object.

Parameters
attributeThe attribute to remove
Returns
The removed attribute

◆ set_Prefix()

void System::Xml::XmlElement::set_Prefix ( String  value)
overridevirtual

Sets the specified value as a prefix for the XML element represented by the current object.

Parameters
valueThe prefix value to set

Reimplemented from System::Xml::XmlNode.

◆ SetAttribute() [1/2]

void System::Xml::XmlElement::SetAttribute ( const String localName,
const String namespaceURI,
const String value 
)

Sets the specified value to the attribute with the specified local name and namespace URI. If the attribut that matches the specified criteria does not exist, it is created.

Parameters
localNameThe local name of the attribute to set the value of
namespaceURIThe namespace URI of the attribute
valueThe value to set

◆ SetAttribute() [2/2]

void System::Xml::XmlElement::SetAttribute ( const String name,
const String value 
)

Sets the specified value to the attribute with the specified qualified name. If the attribut that matches the specified criteria does not exist, it is created.

Parameters
nameThe qualified name of the attribute to set the value of
valueThe value to set

◆ SetAttributeNode()

XmlAttribute::Ptr System::Xml::XmlElement::SetAttributeNode ( const XmlAttribute::Ptr attribute)

Attaches the specified attribute to the XML element represented by the current object.

Returns
The attached attribute

◆ WriteContentTo()

void System::Xml::XmlElement::WriteContentTo ( SharedPtr< XmlWriter writer)
overridevirtual

Saves all children of the node represented by the current object to the specified XmlWiter object.

Parameters
writerThe XmlWriter object to save the nodes to

Reimplemented from System::Xml::XmlNode.

◆ WriteTo()

void System::Xml::XmlElement::WriteTo ( SharedPtr< XmlWriter writer)
overridevirtual

Saves the node represented by the current object to the specified XmlWriter.

Parameters
writerThe XmlWriter object to save the node to

Implements System::Xml::XmlNode.