The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.
XmlAttribute::OwnerDocument Property
.NET Framework (current version)
Gets the XmlDocument to which this node belongs.
Assembly: System.Xml (in System.Xml.dll)
The following example creates an attribute and displays its OwnerDocument.
#using <System.Xml.dll> using namespace System; using namespace System::IO; using namespace System::Xml; int main() { XmlDocument^ doc = gcnew XmlDocument; doc->LoadXml( "<book><title>Pride And Prejudice</title></book>" ); //Create an attribute. XmlAttribute^ attr; attr = doc->CreateAttribute( "bk", "genre", "urn:samples" ); attr->Value = "novel"; //Display the attribute's owner document. Note //that although the attribute has not been inserted //into the document, it still has an owner document. Console::WriteLine( attr->OwnerDocument->OuterXml ); }
Universal Windows Platform
Available since 10
.NET Framework
Available since 1.1
Available since 10
.NET Framework
Available since 1.1
Show: