Qyoto  4.0.7
Qyoto is a C# language binding for Qt
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Properties
QtXml.QDomAttr Class Reference

The QDomAttr class represents one attribute of a QDomElement. More...

Inheritance diagram for QtXml.QDomAttr:
Collaboration diagram for QtXml.QDomAttr:

Public Member Functions

 QDomAttr ()
  More...
 
 QDomAttr (QDomAttr x)
  More...
 
override void CreateProxy ()
 
new void Dispose ()
 
- Public Member Functions inherited from QtXml.QDomNode
override bool Equals (object o)
 
override int GetHashCode ()
 
 QDomNode ()
  More...
 
 QDomNode (QDomNode n)
  More...
 
new QDomNode AppendChild (QDomNode newChild)
  More...
 
new void Clear ()
  More...
 
new QDomNode CloneNode (bool deep=true)
  More...
 
new QDomElement FirstChildElement (string tagName="")
  More...
 
new QDomNode InsertAfter (QDomNode newChild, QDomNode refChild)
  More...
 
new QDomNode InsertBefore (QDomNode newChild, QDomNode refChild)
  More...
 
new bool IsSupported (string feature, string version)
  More...
 
new QDomElement LastChildElement (string tagName="")
  More...
 
new QDomNode NamedItem (string name)
  More...
 
new QDomElement NextSiblingElement (string taName="")
  More...
 
new void Normalize ()
  More...
 
new QDomElement PreviousSiblingElement (string tagName="")
  More...
 
new QDomNode RemoveChild (QDomNode oldChild)
  More...
 
new QDomNode ReplaceChild (QDomNode newChild, QDomNode oldChild)
  More...
 
new void Save (QTextStream str, int indent)
  More...
 
new void Save (QTextStream str, int indent, QDomNode.EncodingPolicy encodingPolicy)
  More...
 
new QDomAttr ToAttr ()
  More...
 
new QDomCDATASection ToCDATASection ()
  More...
 
new QDomCharacterData ToCharacterData ()
  More...
 
new QDomComment ToComment ()
  More...
 
new QDomDocument ToDocument ()
  More...
 
new QDomDocumentFragment ToDocumentFragment ()
  More...
 
new QDomDocumentType ToDocumentType ()
  More...
 
new QDomElement ToElement ()
  More...
 
new QDomEntity ToEntity ()
  More...
 
new QDomEntityReference ToEntityReference ()
  More...
 
new QDomNotation ToNotation ()
  More...
 
new QDomProcessingInstruction ToProcessingInstruction ()
  More...
 
new QDomText ToText ()
  More...
 
new void Dispose ()
 

Protected Member Functions

 QDomAttr (System.Type dummy)
 
- Protected Member Functions inherited from QtXml.QDomNode
 QDomNode (System.Type dummy)
 

Properties

string Value [get, set]
  More...
 
string Name [get]
  More...
 
QDomNode.NodeType nodeType [get]
  More...
 
QDomElement OwnerElement [get]
  More...
 
bool Specified [get]
  More...
 
- Properties inherited from QtXml.QDomNode
string NodeValue [get, set]
  More...
 
string Prefix [get, set]
  More...
 
QDomNamedNodeMap Attributes [get]
  More...
 
QDomNodeList ChildNodes [get]
  More...
 
int ColumnNumber [get]
  More...
 
QDomNode FirstChild [get]
  More...
 
bool HasAttributes [get]
  More...
 
bool HasChildNodes [get]
  More...
 
bool IsAttr [get]
  More...
 
bool IsCDATASection [get]
  More...
 
bool IsCharacterData [get]
  More...
 
bool IsComment [get]
  More...
 
bool IsDocument [get]
  More...
 
bool IsDocumentFragment [get]
  More...
 
bool IsDocumentType [get]
  More...
 
bool IsElement [get]
  More...
 
bool IsEntity [get]
  More...
 
bool IsEntityReference [get]
  More...
 
bool IsNotation [get]
  More...
 
bool IsNull [get]
  More...
 
bool IsProcessingInstruction [get]
  More...
 
bool IsText [get]
  More...
 
QDomNode LastChild [get]
  More...
 
int LineNumber [get]
  More...
 
string LocalName [get]
  More...
 
string NamespaceURI [get]
  More...
 
QDomNode NextSibling [get]
  More...
 
string NodeName [get]
  More...
 
QDomNode.NodeType nodeType [get]
  More...
 
QDomDocument OwnerDocument [get]
  More...
 
QDomNode ParentNode [get]
  More...
 
QDomNode PreviousSibling [get]
  More...
 
virtual System.IntPtr SmokeObject [get, set]
 

Additional Inherited Members

- Public Types inherited from QtXml.QDomNode
enum  EncodingPolicy { EncodingFromDocument = 1, EncodingFromTextStream = 2 }
  More...
 
enum  NodeType {
  AttributeNode = 2, BaseNode = 21, CDATASectionNode = 4, CharacterDataNode = 22,
  CommentNode = 8, DocumentFragmentNode = 11, DocumentNode = 9, DocumentTypeNode = 10,
  ElementNode = 1, EntityNode = 6, EntityReferenceNode = 5, NotationNode = 12,
  ProcessingInstructionNode = 7, TextNode = 3
}
  More...
 
- Static Public Member Functions inherited from QtXml.QDomNode
static bool operator!= (QDomNode one, QDomNode n)
  More...
 
static bool operator== (QDomNode one, QDomNode n)
  More...
 
- Protected Attributes inherited from QtXml.QDomNode
SmokeInvocation interceptor
 

Detailed Description

The QDomAttr class represents one attribute of a QDomElement.

For example, the following piece of XML produces an element with no children, but two attributes:

<link href="http://qt.nokia.com&quot; color="red" />

You can access the attributes of an element with code like this:

QDomElement e = //...

//...

QDomAttr a = e.attributeNode("href");

cout << a.value() << endl; // prints "http://qt.nokia.com&quot;

a.setValue("http://qt.nokia.com/doc&quot;); // change the node's attribute

QDomAttr a2 = e.attributeNode("href");

cout << a2.value() << endl; // prints "http://qt.nokia.com/doc&quot;

This example also shows that changing an attribute received from an element changes the attribute of the element. If you do not want to change the value of the element's attribute you must use cloneNode() to get an independent copy of the attribute.

QDomAttr can return the name() and value() of an attribute. An attribute's value is set with setValue(). If specified() returns true the value was set with setValue(). The node this attribute is attached to (if any) is returned by ownerElement().

For further information about the Document Object Model see http://www.w3.org/TR/REC-DOM-Level-1/ and http://www.w3.org/TR/DOM-Level-2-Core/. For a more general introduction of the DOM implementation see the QDomDocument documentation.

Constructor & Destructor Documentation

QtXml.QDomAttr.QDomAttr ( System.Type  dummy)
protected
QtXml.QDomAttr.QDomAttr ( )

Constructs an empty attribute.

Here is the call graph for this function:

QtXml.QDomAttr.QDomAttr ( QDomAttr  x)

Constructs a copy of x.

The data of the copy is shared (shallow copy): modifying one node will also change the other. If you want to make a deep copy, use cloneNode().

Here is the call graph for this function:

Member Function Documentation

override void QtXml.QDomAttr.CreateProxy ( )
virtual

Reimplemented from QtXml.QDomNode.

Here is the caller graph for this function:

new void QtXml.QDomAttr.Dispose ( )

Property Documentation

string QtXml.QDomAttr.Name
get

Returns the attribute's name.

QDomNode.NodeType QtXml.QDomAttr.nodeType
get

Returns AttributeNode.

QDomElement QtXml.QDomAttr.OwnerElement
get

Returns the element node this attribute is attached to or a null node if this attribute is not attached to any element.

bool QtXml.QDomAttr.Specified
get

Returns true if the attribute has been set by the user with setValue(). Returns false if the value hasn't been specified or set.

See also setValue().

string QtXml.QDomAttr.Value
getset

Returns the value of the attribute or an empty string if the attribute has not been specified.

Sets the attribute's value to v.