System::Xml::XmlAttribute Class Reference

Inherits System::Xml::XmlNode.

Public Types

typedef SharedPtr< XmlAttributePtr
 An alias for a 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...
 
typedef System::Details::SharedMembersType shared_members_type
 structure to keep list of shared pointers contained in object. More...
 

Public Member Functions

XmlNodeType get_NodeType () const override
 Returns the type of the current node. More...
 
ASPOSECPP_SHARED_API String get_Name () const override
 Returns the qualified name of the current attribute. More...
 
ASPOSECPP_SHARED_API String get_LocalName () const override
 Returns the local name of the current attribute. More...
 
String get_InnerText () const override
 Returns the value of the current attribute. More...
 
String get_InnerXml () const override
 Returns the value of the current attribute. More...
 
String get_OuterXml () const override
 Returns the markup of the current attribute in the format [attribute_name]=[attribute_value]. More...
 
ASPOSECPP_SHARED_API String get_Value () const override
 Returns the value of the current attribute. More...
 
bool get_HasChildNodes () const override
 
XmlNode::Ptr get_FirstChild () const override
 Always returns null-pointer. More...
 
XmlNode::Ptr get_LastChild () const override
 Always returns null-pointer. More...
 
XmlNode::Ptr get_NextSibling () const override
 Always returns null-pointer. More...
 
XmlNode::Ptr get_PreviousSibling () const override
 Always returns null-pointer. More...
 
XmlNode::Ptr get_ParentNode () const override
 Always returns null-pointer. More...
 
virtual ASPOSECPP_SHARED_API SharedPtr< XmlElementget_OwnerElement () const
 
SharedPtr< XmlElementidx_get (String) const override
 Always returns null-pointer. More...
 
ASPOSECPP_SHARED_API String get_Prefix () const override
 Returns the namespace prefix of the attribute represented by the current object. More...
 
ASPOSECPP_SHARED_API String get_NamespaceURI () const override
 Returns the namespace URI of the attribute represented by the current object. More...
 
ASPOSECPP_SHARED_API void set_Value (String value) override
 
void set_InnerText (String value) override
 
void set_InnerXml (String) override
 Does nothing. More...
 
ASPOSECPP_SHARED_API void set_Prefix (String value) override
 
void RemoveAll () override
 Does nothing. More...
 
XmlNode::Ptr RemoveChild (XmlNode::Ptr child) override
 
ASPOSECPP_SHARED_API void WriteContentTo (SharedPtr< XmlWriter > writer) override
 
ASPOSECPP_SHARED_API void WriteTo (SharedPtr< XmlWriter > writer) override
 
ASPOSECPP_SHARED_API XmlNode::Ptr CloneNode (bool deep) override
 
- Public Member Functions inherited from System::Xml::XmlNode
virtual ASPOSECPP_SHARED_API ~XmlNode ()
 Destructor. More...
 
virtual ASPOSECPP_SHARED_API SharedPtr< XmlDocumentget_OwnerDocument () const
 
virtual ASPOSECPP_SHARED_API SharedPtr< XmlAttributeCollectionget_Attributes ()
 
virtual ASPOSECPP_SHARED_API SharedPtr< XmlNodeListget_ChildNodes ()
 
virtual SharedPtr< XmlElementoperator[] (String name) const
 
virtual ASPOSECPP_SHARED_API XmlNode::Ptr AppendChild (XmlNode::Ptr child)
 
virtual ASPOSECPP_SHARED_API XmlNode::Ptr PrependChild (XmlNode::Ptr new_child)
 
virtual ASPOSECPP_SHARED_API XmlNode::Ptr ReplaceChild (XmlNode::Ptr new_child, XmlNode::Ptr old_child)
 
virtual ASPOSECPP_SHARED_API XmlNode::Ptr InsertAfter (XmlNode::Ptr new_child, XmlNode::Ptr ref_child)
 
virtual ASPOSECPP_SHARED_API XmlNode::Ptr InsertBefore (XmlNode::Ptr new_child, XmlNode::Ptr ref_child)
 
virtual ASPOSECPP_SHARED_API String GetPrefixOfNamespace (const String &namespace_uri)
 
virtual ASPOSECPP_SHARED_API String GetNamespaceOfPrefix (const String &prefix)
 
virtual ASPOSECPP_SHARED_API SharedPtr< XmlNodeListSelectNodes (String xPath)
 
virtual ASPOSECPP_SHARED_API SharedPtr< XmlNodeListSelectNodes (String xPath, SharedPtr< XmlNamespaceManager > nsMgr)
 
virtual ASPOSECPP_SHARED_API XmlNode::Ptr SelectSingleNode (String xPath)
 
virtual ASPOSECPP_SHARED_API XmlNode::Ptr SelectSingleNode (String xPath, SharedPtr< XmlNamespaceManager > nsMgr)
 
ASPOSECPP_SHARED_API SharedPtr< System::Collections::Generic::IEnumerator< XmlNode::Ptr > > GetEnumerator ()
 
XmlNode::Ptr Clone ()
 
xmlNode * native_node ()
 Returns a pointer to the underlying libxml2 xmlNode object. More...
 
- Public Member Functions inherited from System::Object
ASPOSECPP_SHARED_API Object ()
 Creates object. Initializes all internal data structures. More...
 
virtual ASPOSECPP_SHARED_API ~Object ()
 Destroys object. Frees all internal data structures. More...
 
ASPOSECPP_SHARED_API 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 refernce counter. More...
 
ASPOSECPP_SHARED_API void Lock ()
 Implements C# lock() statement locking. Call directly or use LockContext sentry object. More...
 
ASPOSECPP_SHARED_API void Unlock ()
 Implements C# lock() statement unlocking. Call directly or use LockContext sentry object. More...
 
virtual ASPOSECPP_SHARED_API bool Equals (ptr obj)
 Compares objects using C# Object.Equals semantics. More...
 
virtual ASPOSECPP_SHARED_API int GetHashCode () const
 Analog of C# Object.GetHashCode() method. Enables hashing of custom objects. More...
 
virtual ASPOSECPP_SHARED_API String ToString () ASPOSE_CONST
 Analog of C# Object.ToString() method. Enables converting custom objects to string. More...
 
virtual ASPOSECPP_SHARED_API ptr MemberwiseClone () const
 Analog of C# Object.MemberwiseClone() method. Enables cloning custom types. More...
 
virtual ASPOSECPP_SHARED_API const TypeInfoGetType () const
 Gets actual type of object. Analog of C# System.Object.GetType() call. More...
 
virtual ASPOSECPP_SHARED_API bool Is (const TypeInfo &targetType) const
 Check if object represents an instance of type described by targetType. Analog of C# 'is' operator. More...
 
virtual ASPOSECPP_SHARED_API void SetTemplateWeakPtr (unsigned int argument)
 Set n'th template argument a weak pointer (rather than shared). Allows switching pointers in containers to weak mode. More...
 
template<>
bool Equals (float const &objA, float const &objB)
 
template<>
bool Equals (double const &objA, double const &objB)
 
template<>
bool ReferenceEquals (String const &str, std::nullptr_t)
 
template<>
bool ReferenceEquals (String const &str1, String const &str2)
 

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 ()
 Impleemnts C# typeof(System.Object) construct. More...
 

Detailed Description

Represents an attribute associtaed with an xml element. 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 a shared pointer to an instance of this class.

Member Function Documentation

◆ CloneNode()

ASPOSECPP_SHARED_API XmlNode::Ptr System::Xml::XmlAttribute::CloneNode ( bool  deep)
overridevirtual

NOT IMPLEMENTED

Exceptions
NotImplementedExceptionAlways

Implements System::Xml::XmlNode.

◆ get_FirstChild()

XmlNode::Ptr System::Xml::XmlAttribute::get_FirstChild ( ) const
inlineoverridevirtual

Always returns null-pointer.

Reimplemented from System::Xml::XmlNode.

◆ get_HasChildNodes()

bool System::Xml::XmlAttribute::get_HasChildNodes ( ) const
inlineoverridevirtual

Determines if the current attribute node has children.

Returns
Always false

Reimplemented from System::Xml::XmlNode.

◆ get_InnerText()

String System::Xml::XmlAttribute::get_InnerText ( ) const
inlineoverridevirtual

Returns the value of the current attribute.

Reimplemented from System::Xml::XmlNode.

◆ get_InnerXml()

String System::Xml::XmlAttribute::get_InnerXml ( ) const
inlineoverridevirtual

Returns the value of the current attribute.

Reimplemented from System::Xml::XmlNode.

◆ get_LastChild()

XmlNode::Ptr System::Xml::XmlAttribute::get_LastChild ( ) const
inlineoverridevirtual

Always returns null-pointer.

Reimplemented from System::Xml::XmlNode.

◆ get_LocalName()

ASPOSECPP_SHARED_API String System::Xml::XmlAttribute::get_LocalName ( ) const
overridevirtual

Returns the local name of the current attribute.

Reimplemented from System::Xml::XmlNode.

◆ get_Name()

ASPOSECPP_SHARED_API String System::Xml::XmlAttribute::get_Name ( ) const
overridevirtual

Returns the qualified name of the current attribute.

Implements System::Xml::XmlNode.

◆ get_NamespaceURI()

ASPOSECPP_SHARED_API String System::Xml::XmlAttribute::get_NamespaceURI ( ) const
overridevirtual

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

Reimplemented from System::Xml::XmlNode.

◆ get_NextSibling()

XmlNode::Ptr System::Xml::XmlAttribute::get_NextSibling ( ) const
inlineoverridevirtual

Always returns null-pointer.

Reimplemented from System::Xml::XmlNode.

◆ get_NodeType()

XmlNodeType System::Xml::XmlAttribute::get_NodeType ( ) const
inlineoverridevirtual

Returns the type of the current node.

Reimplemented from System::Xml::XmlNode.

◆ get_OuterXml()

String System::Xml::XmlAttribute::get_OuterXml ( ) const
inlineoverridevirtual

Returns the markup of the current attribute in the format [attribute_name]=[attribute_value].

Reimplemented from System::Xml::XmlNode.

◆ get_OwnerElement()

virtual ASPOSECPP_SHARED_API SharedPtr<XmlElement> System::Xml::XmlAttribute::get_OwnerElement ( ) const
virtual

Returns an XmlElement object that represents an XML element that owns the attribute represented by the current object.

◆ get_ParentNode()

XmlNode::Ptr System::Xml::XmlAttribute::get_ParentNode ( ) const
inlineoverridevirtual

Always returns null-pointer.

Reimplemented from System::Xml::XmlNode.

◆ get_Prefix()

ASPOSECPP_SHARED_API String System::Xml::XmlAttribute::get_Prefix ( ) const
overridevirtual

Returns the namespace prefix of the attribute represented by the current object.

Reimplemented from System::Xml::XmlNode.

◆ get_PreviousSibling()

XmlNode::Ptr System::Xml::XmlAttribute::get_PreviousSibling ( ) const
inlineoverridevirtual

Always returns null-pointer.

Reimplemented from System::Xml::XmlNode.

◆ get_Value()

ASPOSECPP_SHARED_API String System::Xml::XmlAttribute::get_Value ( ) const
overridevirtual

Returns the value of the current attribute.

Reimplemented from System::Xml::XmlNode.

◆ idx_get()

SharedPtr<XmlElement> System::Xml::XmlAttribute::idx_get ( String  ) const
inlineoverridevirtual

Always returns null-pointer.

Reimplemented from System::Xml::XmlNode.

◆ RemoveAll()

void System::Xml::XmlAttribute::RemoveAll ( )
inlineoverridevirtual

Does nothing.

Reimplemented from System::Xml::XmlNode.

◆ RemoveChild()

XmlNode::Ptr System::Xml::XmlAttribute::RemoveChild ( XmlNode::Ptr  child)
inlineoverridevirtual

Does nothing.

Parameters
childIGNORED
Returns
Null-pointer

Reimplemented from System::Xml::XmlNode.

◆ set_InnerText()

void System::Xml::XmlAttribute::set_InnerText ( String  value)
inlineoverridevirtual

Sets the value of the attribute represented by the current object.

Parameters
valueThe value to set

Reimplemented from System::Xml::XmlNode.

◆ set_InnerXml()

void System::Xml::XmlAttribute::set_InnerXml ( String  )
inlineoverridevirtual

Does nothing.

Reimplemented from System::Xml::XmlNode.

◆ set_Prefix()

ASPOSECPP_SHARED_API void System::Xml::XmlAttribute::set_Prefix ( String  value)
overridevirtual

Sets the namespace prefix of the attribute represented by the current object.

Parameters
valueThe namespace prefix to set

Reimplemented from System::Xml::XmlNode.

◆ set_Value()

ASPOSECPP_SHARED_API void System::Xml::XmlAttribute::set_Value ( String  value)
overridevirtual

Sets the value of the attribute represented by the current object.

Parameters
valueThe value to set

Reimplemented from System::Xml::XmlNode.

◆ WriteContentTo()

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

Writes the value of the attribute represented by the current object to the specified XmlWriter.

Parameters
writerThe XmlWriter object to write to

Reimplemented from System::Xml::XmlNode.

◆ WriteTo()

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

Writes the attribute represented by the current object to the specified XmlWriter object.

Parameters
writerThe XmlWriter object to write to.

Implements System::Xml::XmlNode.