Difference between revisions of "XElement class"

From Catglobe Wiki
Jump to: navigation, search
(Created page with "=== XElement : An element in an xml document === ==== Constructors ==== (Params AnyType) - Create a new element with a number of child elements<br>(string xml (A xml str...")
 
Line 1: Line 1:
 
=== XElement&nbsp;: An element in an xml document  ===
 
=== XElement&nbsp;: An element in an xml document  ===
  
==== Constructors  ====
+
==== <span style="color:#a52a2a;">Constructors</span> ====
  
(Params AnyType) - Create a new element with a number of child elements<br>(string xml (A xml string)) - Create a new element from a string<br>(string name (Name of the element), AnyType value (Value of the element)) - Create a new element with a name and value
+
'''(Params AnyType)''' - Create a new element with a number of child elements<br>'''(string xml '''''(A xml string)''''')''' - Create a new element from a string<br>'''(string name'''''(Name of the element), AnyType value (Value of the element)''''')''' - Create a new element with a name and value  
  
==== Methods ====
+
==== <span style="color:#a52a2a;">Methods</span>  ====
Empty Add(AnyType content (Content to add)) - Adds the specified content as children of this element.<br>Empty Add(Params AnyType) - Adds the specified content as children of this element.<br>Empty AddAfterSelf(AnyType content (Content to add)) - Adds the specified content immediately after this node.<br>Empty AddBeforeSelf(AnyType content (Content to add)) - Adds the specified content immediately before this node.<br>Empty AddFirst(AnyType content (Content to add)) - Adds the specified content as the first children of this document or element.<br>Empty AddFirst(Params AnyType) - Adds the specified content as the first children of this document or element.<br>array Ancestors() - Returns a collection of the ancestor elements of this node.<br>array Ancestors(string name (Name of ancestor to look for)) - Returns a filtered collection of the ancestor elements of this node. Only elements that have a matching name are included in the collection.<br>array AncestorsAndSelf() - Returns a collection of elements that contain this element, and the ancestors of this element.<br>array AncestorsAndSelf(string name (Name of ancestor to look for)) - Returns a collection of elements that contain this element, and the ancestors of this element. Only elements that have a matching name are included in the collection.<br>array Descendants() - Returns a collection of the descendant elements for this document or element, in document order.<br>array Descendants(string name (Name of ancestor to look for)) - Returns a collection of the descendant elements for this document or element, in document order. Only elements that have a matching name are included in the collection.<br>array DescendantsAndSelf() - Returns a collection of elements that contain this element, and all descendant elements of this element, in document order.<br>array DescendantsAndSelf(string name (Name of ancestor to look for)) - Returns a filtered collection of elements that contain this element, and all descendant elements of this element, in document order. Only elements that have a matching name are included in the collection.<br>XElement Element(string name (Name of ancestor to look for)) - Gets the first (in document order) child element with the specified name.<br>array Elements() - Returns a collection of the child elements of this element or document, in document order.<br>array Elements(string name (Name of ancestor to look for)) - Returns a collection of the child elements of this element or document, in document order. Only elements that have a matching name are included in the collection.<br>array ElementsAfterSelf() - Returns a collection of the sibling elements after this node, in document order.<br>array ElementsAfterSelf(string name (Name of ancestor to look for)) - Returns a filtered collection of the sibling elements after this node, in document order. Only elements that have a matching name are included in the collection.<br>array ElementsBeforeSelf() - Returns a collection of the sibling elements before this node, in document order.<br>array ElementsBeforeSelf(string name (Name of ancestor to look for)) - Returns a filtered collection of the sibling elements before this node, in document order. Only elements that have a matching name are included in the collection.<br>string get_Item(string attributename (The attribute name.)) - Gets an attribute value.<br>Empty Remove() - Removes this node from its parent.<br>Empty RemoveAll() - Removes nodes and attributes from this element.<br>Empty RemoveAttributes() - Removes attributes from this element.<br>Empty RemoveNodes() - Removes the child nodes from this document or element.<br>Empty ReplaceWith(AnyType content (Content to replace with)) - Replaces this node with the specified content.<br>Empty ReplaceWith(Params AnyType) - Replaces this node with the specified content.<br>Empty ReplaceWith(AnyType content (Content to replace with)) - Replaces the children nodes of this document or element with the specified content.<br>Empty ReplaceWith(Params AnyType) - Replaces the children nodes of this document or element with the specified content.<br>Empty set_Item(string attributename (The attribute name.), string value (Value to set.)) - Sets an attribute value.<br>string ToString() - The string representation of the object.
 
  
==== Properties ====
+
'''Empty Add(AnyType content '''''(Content to add)''''')''' - Adds the specified content as children of this element.<br>'''Empty Add(Params AnyType)''' - Adds the specified content as children of this element.<br>'''Empty AddAfterSelf(AnyType content '''''(Content to add)''''')''' - Adds the specified content immediately after this node.<br>'''Empty AddBeforeSelf(AnyType content'''''(Content to add)''''')''' - Adds the specified content immediately before this node.<br>'''Empty AddFirst(AnyType content '''''(Content to add)''''')''' - Adds the specified content as the first children of this document or element.<br>'''Empty AddFirst(Params AnyType)''' - Adds the specified content as the first children of this document or element.<br>'''array Ancestors()''' - Returns a collection of the ancestor elements of this node.<br>'''array Ancestors(string name '''''(Name of ancestor to look for)''''')''' - Returns a filtered collection of the ancestor elements of this node. Only elements that have a matching name are included in the collection.<br>'''array AncestorsAndSelf()''' - Returns a collection of elements that contain this element, and the ancestors of this element.<br>'''array AncestorsAndSelf(string name '''''(Name of ancestor to look for)''''')''' - Returns a collection of elements that contain this element, and the ancestors of this element. Only elements that have a matching name are included in the collection.<br>'''array Descendants()''' - Returns a collection of the descendant elements for this document or element, in document order.<br>'''array Descendants(string name '''''(Name of ancestor to look for)''''')''' - Returns a collection of the descendant elements for this document or element, in document order. Only elements that have a matching name are included in the collection.<br>'''array DescendantsAndSelf() '''- Returns a collection of elements that contain this element, and all descendant elements of this element, in document order.<br>'''array DescendantsAndSelf(string name '''''(Name of ancestor to look for)''''')''' - Returns a filtered collection of elements that contain this element, and all descendant elements of this element, in document order. Only elements that have a matching name are included in the collection.<br>'''XElement Element(string name'''''(Name of ancestor to look for)''''')''' - Gets the first (in document order) child element with the specified name.<br>'''array Elements()''' - Returns a collection of the child elements of this element or document, in document order.<br>'''array Elements(string name '''''(Name of ancestor to look for)''''')''' - Returns a collection of the child elements of this element or document, in document order. Only elements that have a matching name are included in the collection.<br>'''array ElementsAfterSelf()''' - Returns a collection of the sibling elements after this node, in document order.<br>'''array ElementsAfterSelf(string name '''''(Name of ancestor to look for)''''')''' - Returns a filtered collection of the sibling elements after this node, in document order. Only elements that have a matching name are included in the collection.<br>'''array ElementsBeforeSelf()''' - Returns a collection of the sibling elements before this node, in document order.<br>'''array ElementsBeforeSelf(string name '''''(Name of ancestor to look for)''''')''' - Returns a filtered collection of the sibling elements before this node, in document order. Only elements that have a matching name are included in the collection.<br>'''string get_Item(string attributename'''''(The attribute name.)''''')''' - Gets an attribute value.<br>'''Empty Remove()''' - Removes this node from its parent.<br>'''Empty RemoveAll()''' - Removes nodes and attributes from this element.<br>'''Empty RemoveAttributes()''' - Removes attributes from this element.<br>'''Empty RemoveNodes()''' - Removes the child nodes from this document or element.<br>'''Empty ReplaceWith(AnyType content '''''(Content to replace with)''''')''' - Replaces this node with the specified content.<br>'''Empty ReplaceWith(Params AnyType)''' - Replaces this node with the specified content.<br>'''Empty ReplaceWith(AnyType content '''''(Content to replace with)''''')''' - Replaces the children nodes of this document or element with the specified content.<br>'''Empty ReplaceWith(Params AnyType)''' - Replaces the children nodes of this document or element with the specified content.<br>'''Empty set_Item(string attributename '''''(The attribute name.)''''', string value'''''(Value to set.)''''')''' - Sets an attribute value.<br>'''string ToString()''' - The string representation of the object.
Dictionary Attributes HasGetter HasSetter - (Get/sets the collection of attributes of this element. The get returns a copy, use the indexer instead.)<br>bool HasAttributes HasGetter - (Gets a value indicating whether this element as at least one attribute.)<br>bool HasElements HasGetter - (Gets a value indicating whether this element has at least one child element.)<br>bool IsEmpty HasGetter - (Gets a value indicating whether this element contains no content.)<br>string Name HasGetter HasSetter - (Gets/sets the name of this element.)<br>string ObjectTypeName HasGetter - (The name of the type of object.)<br>XElement Parent HasGetter - (Gets the parent XElement)<br>TypeInformation TypeInformation HasGetter - (Get information about this class.)<br>string Value HasGetter HasSetter - (Gets/sets the concatenated text contents of this element.)<br>  
+
 
 +
==== <span style="color:#a52a2a;">Properties</span>  ====
 +
 
 +
'''Dictionary Attributes HasGetter HasSetter''' - Get/sets the collection of attributes of this element. The get returns a copy, use the indexer instead.<br>'''bool HasAttributes HasGetter''' - Gets a value indicating whether this element as at least one attribute.<br>'''bool HasElements HasGetter''' - Gets a value indicating whether this element has at least one child element.<br>'''bool IsEmpty HasGetter''' - Gets a value indicating whether this element contains no content.<br>'''string Name HasGetter HasSetter''' - Gets/sets the name of this element.<br>'''string ObjectTypeName HasGetter''' - The name of the type of object.<br>'''XElement Parent HasGetter''' - Gets the parent XElement<br>'''TypeInformation TypeInformation HasGetter''' - Get information about this class.<br>'''string Value HasGetter HasSetter''' - Gets/sets the concatenated text contents of this element.  
 +
 
 +
==== <span style="color:#a52a2a;">Examples</span> ====
  
 
[[Category:Data_Types_Literals_and_Variables]]
 
[[Category:Data_Types_Literals_and_Variables]]

Revision as of 05:25, 15 September 2011

XElement : An element in an xml document

Constructors

(Params AnyType) - Create a new element with a number of child elements
(string xml (A xml string)) - Create a new element from a string
(string name(Name of the element), AnyType value (Value of the element)) - Create a new element with a name and value

Methods

Empty Add(AnyType content (Content to add)) - Adds the specified content as children of this element.
Empty Add(Params AnyType) - Adds the specified content as children of this element.
Empty AddAfterSelf(AnyType content (Content to add)) - Adds the specified content immediately after this node.
Empty AddBeforeSelf(AnyType content(Content to add)) - Adds the specified content immediately before this node.
Empty AddFirst(AnyType content (Content to add)) - Adds the specified content as the first children of this document or element.
Empty AddFirst(Params AnyType) - Adds the specified content as the first children of this document or element.
array Ancestors() - Returns a collection of the ancestor elements of this node.
array Ancestors(string name (Name of ancestor to look for)) - Returns a filtered collection of the ancestor elements of this node. Only elements that have a matching name are included in the collection.
array AncestorsAndSelf() - Returns a collection of elements that contain this element, and the ancestors of this element.
array AncestorsAndSelf(string name (Name of ancestor to look for)) - Returns a collection of elements that contain this element, and the ancestors of this element. Only elements that have a matching name are included in the collection.
array Descendants() - Returns a collection of the descendant elements for this document or element, in document order.
array Descendants(string name (Name of ancestor to look for)) - Returns a collection of the descendant elements for this document or element, in document order. Only elements that have a matching name are included in the collection.
array DescendantsAndSelf() - Returns a collection of elements that contain this element, and all descendant elements of this element, in document order.
array DescendantsAndSelf(string name (Name of ancestor to look for)) - Returns a filtered collection of elements that contain this element, and all descendant elements of this element, in document order. Only elements that have a matching name are included in the collection.
XElement Element(string name(Name of ancestor to look for)) - Gets the first (in document order) child element with the specified name.
array Elements() - Returns a collection of the child elements of this element or document, in document order.
array Elements(string name (Name of ancestor to look for)) - Returns a collection of the child elements of this element or document, in document order. Only elements that have a matching name are included in the collection.
array ElementsAfterSelf() - Returns a collection of the sibling elements after this node, in document order.
array ElementsAfterSelf(string name (Name of ancestor to look for)) - Returns a filtered collection of the sibling elements after this node, in document order. Only elements that have a matching name are included in the collection.
array ElementsBeforeSelf() - Returns a collection of the sibling elements before this node, in document order.
array ElementsBeforeSelf(string name (Name of ancestor to look for)) - Returns a filtered collection of the sibling elements before this node, in document order. Only elements that have a matching name are included in the collection.
string get_Item(string attributename(The attribute name.)) - Gets an attribute value.
Empty Remove() - Removes this node from its parent.
Empty RemoveAll() - Removes nodes and attributes from this element.
Empty RemoveAttributes() - Removes attributes from this element.
Empty RemoveNodes() - Removes the child nodes from this document or element.
Empty ReplaceWith(AnyType content (Content to replace with)) - Replaces this node with the specified content.
Empty ReplaceWith(Params AnyType) - Replaces this node with the specified content.
Empty ReplaceWith(AnyType content (Content to replace with)) - Replaces the children nodes of this document or element with the specified content.
Empty ReplaceWith(Params AnyType) - Replaces the children nodes of this document or element with the specified content.
Empty set_Item(string attributename (The attribute name.), string value(Value to set.)) - Sets an attribute value.
string ToString() - The string representation of the object.

Properties

Dictionary Attributes HasGetter HasSetter - Get/sets the collection of attributes of this element. The get returns a copy, use the indexer instead.
bool HasAttributes HasGetter - Gets a value indicating whether this element as at least one attribute.
bool HasElements HasGetter - Gets a value indicating whether this element has at least one child element.
bool IsEmpty HasGetter - Gets a value indicating whether this element contains no content.
string Name HasGetter HasSetter - Gets/sets the name of this element.
string ObjectTypeName HasGetter - The name of the type of object.
XElement Parent HasGetter - Gets the parent XElement
TypeInformation TypeInformation HasGetter - Get information about this class.
string Value HasGetter HasSetter - Gets/sets the concatenated text contents of this element.

Examples