Inherits System::Xml::XmlNode.

Public Types

typedef SharedPtr< XmlDeclarationPtr
 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...
 
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 node represented by the current object. More...
 
String get_Name () const override
 Returns the name of the node represented by the current object. More...
 
ASPOSECPP_SHARED_API String get_Value () const override
 Returns the value of the XML declaration node represented by the current object. More...
 
String get_LocalName () const override
 Returns the name of the node represented by the current object. More...
 
String get_Prefix () const override
 Returns the namespace prefix of this node. More...
 
String get_NamespaceURI () const override
 Returns the namespace URI of this node. More...
 
ASPOSECPP_SHARED_API String get_InnerText () const override
 Returns the contents of the XML declaration node represented by the current object. More...
 
ASPOSECPP_SHARED_API String get_InnerXml () const override
 Returns the XML markup of the child nodes of the XML declaration node represented by the current object. More...
 
ASPOSECPP_SHARED_API String get_OuterXml () const override
 Returns the XML markup of the XML declaration node represented by the current object and all its child nodes. More...
 
bool get_HasChildNodes () const override
 
ASPOSECPP_SHARED_API XmlNode::Ptr get_FirstChild () const override
 
ASPOSECPP_SHARED_API XmlNode::Ptr get_LastChild () const override
 
ASPOSECPP_SHARED_API XmlNode::Ptr get_NextSibling () const override
 
ASPOSECPP_SHARED_API XmlNode::Ptr get_PreviousSibling () const override
 
ASPOSECPP_SHARED_API XmlNode::Ptr get_ParentNode () const override
 Returns the parent node of the node represented by the current object. More...
 
String get_Version () const
 Returns the XML version specified in the XML declaration node represented by the current object. More...
 
String get_Encoding () const
 Returns the character encoding specified in the XML declaration node represented by the current object. More...
 
String get_Standalone () const
 Returns the value of 'standalone' attribute of the XML declaration node represented by the current object. More...
 
void set_Value (String value) override
 
ASPOSECPP_SHARED_API void set_Encoding (const String &value)
 
ASPOSECPP_SHARED_API void set_Standalone (const String &value)
 
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 String get_BaseURI () const
 
virtual ASPOSECPP_SHARED_API SharedPtr< XmlDocumentget_OwnerDocument () const
 
virtual ASPOSECPP_SHARED_API SharedPtr< XmlAttributeCollectionget_Attributes ()
 
virtual ASPOSECPP_SHARED_API SharedPtr< XmlNodeListget_ChildNodes ()
 
virtual void set_Prefix (String)
 Sets the prefix of the XML node represented by the current object. More...
 
virtual ASPOSECPP_SHARED_API void set_InnerText (String value)
 
virtual ASPOSECPP_SHARED_API void set_InnerXml (String value)
 
virtual SharedPtr< XmlElementidx_get (String) const
 Returns a shared pointer to the newly constructed XmlElement object. More...
 
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 void RemoveAll ()
 Removes all child nodes of the XML node reprsented by the current object. More...
 
virtual ASPOSECPP_SHARED_API XmlNode::Ptr RemoveChild (XmlNode::Ptr 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...
 
virtual ASPOSECPP_SHARED_API SharedPtr< XPath::XPathNavigatorCreateNavigator () override
 
virtual ASPOSECPP_SHARED_API void Normalize ()
 
- 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 () 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)
 

Protected Types

enum  { LIBXML2_STANDALONE_YES = 1, LIBXML2_STANDALONE_NO = 0, LIBXML2_STANDALONE_NO_XML_DECL = -1, LIBXML2_STANDALONE_NOT_DECL = -2 }
 Represents values of 'standalone' attribute or the absence of the attribute. More...
 
- Protected Types inherited from System::Xml::XmlNode
enum  insert_where { insert_begin, insert_before, insert_after, insert_end }
 

Protected Member Functions

ASPOSECPP_SHARED_API ~XmlDeclaration () override
 Destructor. More...
 
ASPOSECPP_SHARED_API XmlDeclaration (const SharedPtr< XmlDocument > &owner, const String &version, const String &encoding, int standalone)
 
void AttachToOwner ()
 Attaches the node represented by the current object to the owner. More...
 
void DetachFromOwner ()
 Detaches the node represented by the current object from the owner. More...
 
void ChangeEncodingForNativeXmlDoc ()
 More complex operation for change 'encoding' value for current libxml2 document node. More...
 
void ChangeStandaloneForNativeXmlDoc ()
 More complex operation for change 'standalone' value for current libxml2 document node. More...
 
- Protected Member Functions inherited from System::Xml::XmlNode
ASPOSECPP_SHARED_API ~XmlNode () override
 Destructor. More...
 
ASPOSECPP_SHARED_API XmlNode (xmlNode *node)
 
ASPOSECPP_SHARED_API XmlNode (xmlNode *node, const SharedPtr< XmlDocument > &owner)
 
ASPOSECPP_SHARED_API XmlNode (const SharedPtr< XmlDocument > &owner)
 
SharedPtr< XmlElementfind_child_xml_element_by_name (const String &name, const SharedPtr< XmlDocument > &owner_doc) const
 
uint64_t child_elements_count () const
 
bool can_be_append (XmlNodeType type) const
 
insert_where noralize_place (xmlNode *ref_child, insert_where place)
 
void insert_verified_child_node (const XmlNode::Ptr &child, xmlNode *ref_child, insert_where place)
 
void insert_document_fragment (const XmlNode::Ptr &fragment, xmlNode *ref_child, insert_where place)
 
void reassign_native (xmlNode *node)
 
xmlAttr * get_attribute_by_qname (const String &qname) const
 
xmlNs * find_ns (const std::string &prefix) const
 
ASPOSECPP_SHARED_API void set_Value (const String &text, bool riseEvent)
 

Static Protected Member Functions

static ASPOSECPP_SHARED_API String StandaloneToString (int libxml2_doc_standalone)
 
static ASPOSECPP_SHARED_API int StringToStandalone (const String &standalone)
 
- Static Protected Member Functions inherited from System::Xml::XmlNode
static xmlNs * make_new_ns (xmlNodePtr parent, const std::string &prefix, const std::string &uri="")
 
static void parse_qname (const std::string &qname, std::string &prefix, std::string &local_name)
 
static int csharp_nodetype_to_libxml (XmlNodeType type)
 
static XmlNode::Ptr create_wrapper (xmlNode *node, const SharedPtr< XmlDocument > &owner, xmlDoc *doc=nullptr)
 
static SharedPtr< XmlAttributecreate_wrapper_attr (xmlAttr *attr, const SharedPtr< XmlDocument > &owner)
 
static SharedPtr< XmlAttributecreate_wrapper_attr (xmlNs *ns, const SharedPtr< XmlDocument > &owner, const SharedPtr< XmlElement > &element)
 
static SharedPtr< XmlAttributecreate_wrapper_attr (const String &prefix, const String &local_name, const String &namespace_uri, const SharedPtr< XmlDocument > &owner)
 
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...
 

Protected Attributes

String m_version
 The value of 'version' attribute of the node represented by the current object. More...
 
String m_encoding
 The value of 'encoding' attribute of the node represented by the current object. More...
 
int m_standalone
 The numeric equivalent of the value of 'standolane' attribute of the node represented by the current object. More...
 
bool m_attached
 Indication if the node represented by the current object is attached to its owner. More...
 
- Protected Attributes inherited from System::Xml::XmlNode
xmlDoc * m_doc
 
xmlNode * m_node
 Pointer to underlying libxml2 xmlNode object. More...
 
WeakPtr< XmlDocumentm_owner
 Weak poiter to the owning XML 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 ()
 Impleemnts C# typeof(System.Object) construct. More...
 

Detailed Description

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

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
protected

Represents values of 'standalone' attribute or the absence of the attribute.

Enumerator
LIBXML2_STANDALONE_YES 

The 'standalone' attribute is present and its value is 'yes'.

LIBXML2_STANDALONE_NO 

The 'standalone' attribute is present and its value is 'no'.

LIBXML2_STANDALONE_NO_XML_DECL 

The XML declaration is absent in a document.

LIBXML2_STANDALONE_NOT_DECL 

The 'standalone' attribute is absent in XML declaration.

Constructor & Destructor Documentation

◆ ~XmlDeclaration()

ASPOSECPP_SHARED_API System::Xml::XmlDeclaration::~XmlDeclaration ( )
overrideprotected

Destructor.

◆ XmlDeclaration()

ASPOSECPP_SHARED_API System::Xml::XmlDeclaration::XmlDeclaration ( const SharedPtr< XmlDocument > &  owner,
const String version,
const String encoding,
int  standalone 
)
protected

Constructs an XmlDeclaration object representing the XML declaration node with the specified attributes and belonging to the specified XmlDocument.

Parameters
ownerThe owner XML document to which the XmlDeclaration object being constructed will belong
versionThe value of 'version' attribute of the XML declaration node represented by the object being constructed
encodingThe value of 'encoding' attribute of the XML declaration node represented by the object being constructed
standaloneThe value of 'standalone' attribute of the XML declaration node represented by the object being constructed

Member Function Documentation

◆ AttachToOwner()

void System::Xml::XmlDeclaration::AttachToOwner ( )
protected

Attaches the node represented by the current object to the owner.

◆ ChangeEncodingForNativeXmlDoc()

void System::Xml::XmlDeclaration::ChangeEncodingForNativeXmlDoc ( )
protected

More complex operation for change 'encoding' value for current libxml2 document node.

◆ ChangeStandaloneForNativeXmlDoc()

void System::Xml::XmlDeclaration::ChangeStandaloneForNativeXmlDoc ( )
protected

More complex operation for change 'standalone' value for current libxml2 document node.

◆ CloneNode()

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

NOT IMPLEMENTED

Exceptions
NotImplementedExceptionAlways

Implements System::Xml::XmlNode.

◆ DetachFromOwner()

void System::Xml::XmlDeclaration::DetachFromOwner ( )
protected

Detaches the node represented by the current object from the owner.

◆ get_Encoding()

String System::Xml::XmlDeclaration::get_Encoding ( ) const
inline

Returns the character encoding specified in the XML declaration node represented by the current object.

◆ get_FirstChild()

ASPOSECPP_SHARED_API XmlNode::Ptr System::Xml::XmlDeclaration::get_FirstChild ( ) const
overridevirtual

Returns the first child of the node represented by the current object.

Returns
Null-pointer

Reimplemented from System::Xml::XmlNode.

◆ get_HasChildNodes()

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

Determines if the node represented by the current object has child nodes.

Returns
Always false

Reimplemented from System::Xml::XmlNode.

◆ get_InnerText()

ASPOSECPP_SHARED_API String System::Xml::XmlDeclaration::get_InnerText ( ) const
overridevirtual

Returns the contents of the XML declaration node represented by the current object.

Reimplemented from System::Xml::XmlNode.

◆ get_InnerXml()

ASPOSECPP_SHARED_API String System::Xml::XmlDeclaration::get_InnerXml ( ) const
overridevirtual

Returns the XML markup of the child nodes of the XML declaration node represented by the current object.

Reimplemented from System::Xml::XmlNode.

◆ get_LastChild()

ASPOSECPP_SHARED_API XmlNode::Ptr System::Xml::XmlDeclaration::get_LastChild ( ) const
overridevirtual

Returns the last child of the node represented by the current object.

Returns
Null-pointer

Reimplemented from System::Xml::XmlNode.

◆ get_LocalName()

String System::Xml::XmlDeclaration::get_LocalName ( ) const
inlineoverridevirtual

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

Reimplemented from System::Xml::XmlNode.

◆ get_Name()

String System::Xml::XmlDeclaration::get_Name ( ) const
inlineoverridevirtual

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

Implements System::Xml::XmlNode.

◆ get_NamespaceURI()

String System::Xml::XmlDeclaration::get_NamespaceURI ( ) const
inlineoverridevirtual

Returns the namespace URI of this node.

Reimplemented from System::Xml::XmlNode.

◆ get_NextSibling()

ASPOSECPP_SHARED_API XmlNode::Ptr System::Xml::XmlDeclaration::get_NextSibling ( ) const
overridevirtual

Returns the next sibling of the node represented by the current object.

Returns
Shared pointer to the XmlNode object representing the node that immediately follows the node represented by the current object.

Reimplemented from System::Xml::XmlNode.

◆ get_NodeType()

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

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

Reimplemented from System::Xml::XmlNode.

◆ get_OuterXml()

ASPOSECPP_SHARED_API String System::Xml::XmlDeclaration::get_OuterXml ( ) const
overridevirtual

Returns the XML markup of the XML declaration node represented by the current object and all its child nodes.

Reimplemented from System::Xml::XmlNode.

◆ get_ParentNode()

ASPOSECPP_SHARED_API XmlNode::Ptr System::Xml::XmlDeclaration::get_ParentNode ( ) const
overridevirtual

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

Reimplemented from System::Xml::XmlNode.

◆ get_Prefix()

String System::Xml::XmlDeclaration::get_Prefix ( ) const
inlineoverridevirtual

Returns the namespace prefix of this node.

Reimplemented from System::Xml::XmlNode.

◆ get_PreviousSibling()

ASPOSECPP_SHARED_API XmlNode::Ptr System::Xml::XmlDeclaration::get_PreviousSibling ( ) const
overridevirtual

Returns the previous sibling of the node represented by the current object.

Returns
Null-pointer

Reimplemented from System::Xml::XmlNode.

◆ get_Standalone()

String System::Xml::XmlDeclaration::get_Standalone ( ) const
inline

Returns the value of 'standalone' attribute of the XML declaration node represented by the current object.

◆ get_Value()

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

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

Reimplemented from System::Xml::XmlNode.

◆ get_Version()

String System::Xml::XmlDeclaration::get_Version ( ) const
inline

Returns the XML version specified in the XML declaration node represented by the current object.

◆ set_Encoding()

ASPOSECPP_SHARED_API void System::Xml::XmlDeclaration::set_Encoding ( const String value)

Sets the characetr encoding for the XML document.

Parameters
valueThe name of the encoding to set

◆ set_Standalone()

ASPOSECPP_SHARED_API void System::Xml::XmlDeclaration::set_Standalone ( const String value)

Sets the value of 'standalone' attribute of the XML declaration node represented by the current object.

Parameters
valueThe value of the attribute to set

◆ set_Value()

void System::Xml::XmlDeclaration::set_Value ( String  value)
inlineoverridevirtual

Does nothing.

Parameters
valueIGNORED

Reimplemented from System::Xml::XmlNode.

◆ StandaloneToString()

static ASPOSECPP_SHARED_API String System::Xml::XmlDeclaration::StandaloneToString ( int  libxml2_doc_standalone)
staticprotected

Returns the string representation of the specified value of 'standalone' attribute of the XML declaration node.

Parameters
libxml2_doc_standaloneThe numeric value representing one of possible values of 'standalone' attribute of the XML declaration node.
Returns
A string repesentation of libxml2_doc_standalone

◆ StringToStandalone()

static ASPOSECPP_SHARED_API int System::Xml::XmlDeclaration::StringToStandalone ( const String standalone)
staticprotected

Returns a numeric value corresponding to the specified string representation of the value of 'standalone' attribute of the XML declaration node.

Parameters
standaloneThe string representation of the value of 'standalone' attribute of the XML declaration node
Returns
An integer value that corresponds to standalone

◆ WriteContentTo()

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

Does nothing.

Parameters
writerIGNORED

Reimplemented from System::Xml::XmlNode.

◆ WriteTo()

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

Saves the node to the specified XmlWriter.

Parameters
writerThe XmlWriter object to save the node to

Implements System::Xml::XmlNode.

Member Data Documentation

◆ m_attached

bool System::Xml::XmlDeclaration::m_attached
protected

Indication if the node represented by the current object is attached to its owner.

◆ m_encoding

String System::Xml::XmlDeclaration::m_encoding
protected

The value of 'encoding' attribute of the node represented by the current object.

◆ m_standalone

int System::Xml::XmlDeclaration::m_standalone
protected

The numeric equivalent of the value of 'standolane' attribute of the node represented by the current object.

◆ m_version

String System::Xml::XmlDeclaration::m_version
protected

The value of 'version' attribute of the node represented by the current object.