|
.NET Framework | |||||||||
PREV TYPE NEXT TYPE | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONST | PROP | METHOD | OP | EVENT | DETAIL: FIELD | CONST | PROP | METHOD | OP | EVENT |
A JDOM {@link Element} that is tailored for Anakia needs. It has {@link #selectNodes(String)} method as well as a {@link #toString()} that outputs the XML serialized form of the element. This way it acts in much the same way as a single-element {@link NodeList} would.
Properties inherited from class System.Xml.XmlElement |
---|
Attributes, HasAttributes, InnerText, InnerXml, IsEmpty, LocalName, Name, NamespaceURI, NextSibling, NodeType, OwnerDocument, Prefix |
Properties inherited from class System.Xml.XmlLinkedNode |
---|
PreviousSibling |
Properties inherited from class System.Xml.XmlNode |
---|
BaseURI, ChildNodes, FirstChild, HasChildNodes, IsReadOnly, Item, Item, LastChild, OuterXml, ParentNode, Value |
Method Summary | |
---|---|
System.Collections.IList |
GetAttributes() This returns the complete set of attributes for this element, as a NodeListof Attributeobjects in no particular order, or an empty list if there are none. The returned list is "live" and changes to it affect the element's actual attributes. |
System.Xml.XmlNode | GetChild(string xpath) |
System.Collections.IList |
GetChildren(string name, string ns) This returns a NodeListof all the child elements nested directly (one level deep) within this element with the given local name and belonging to the given Namespace, returned as Elementobjects. If this target element has no nested elements with the given name in the given Namespace, an empty List is returned. The returned list is "live" in document order and changes to it affect the element's actual contents. Please see the notes for {@link #getChildren}for a code example. |
System.Collections.IList |
GetChildren(string name) This returns a NodeListof all the child elements nested directly (one level deep) within this element with the given local name and belonging to no namespace, returned as Elementobjects. If this target element has no nested elements with the given name outside a namespace, an empty List is returned. The returned list is "live" in document order and changes to it affect the element's actual contents. Please see the notes for {@link #getChildren}for a code example. |
System.Collections.IList |
GetChildren() This returns a NodeListof all the child elements nested directly (one level deep) within this element, as Elementobjects. If this target element has no nested elements, an empty List is returned. The returned list is "live" in document order and changes to it affect the element's actual contents. This performs no recursion, so elements nested two levels deep would have to be obtained with: Iterator itr = currentElement.getChildren().iterator(); while (itr.hasNext()) { Element oneLevelDeep = (Element)nestedElements.next(); List twoLevelsDeep = oneLevelDeep.getChildren(); // Do something with these children } |
System.Collections.IList |
GetContent() This returns the full content of the element as a NodeList which may contain objects of type String, Element, Comment, ProcessingInstruction, CDATA, and EntityRef. The List returned is "live" in document order and modifications to it affect the element's actual contents. Whitespace content is returned in its entirety. |
string |
ToString() Returns the XML serialized form of this element, as produced by the default {@link XMLOutputter}. |
Methods inherited from class System.Xml.XmlElement |
---|
CloneNode, GetAttribute, GetAttribute, GetAttributeNode, GetAttributeNode, GetElementsByTagName, GetElementsByTagName, HasAttribute, HasAttribute, RemoveAll, RemoveAllAttributes, RemoveAttribute, RemoveAttribute, RemoveAttributeAt, RemoveAttributeNode, RemoveAttributeNode, SetAttribute, SetAttribute, SetAttributeNode, SetAttributeNode, WriteContentTo, WriteTo |
Methods inherited from class System.Xml.XmlNode |
---|
AppendChild, Clone, CreateNavigator, GetEnumerator, GetNamespaceOfPrefix, GetPrefixOfNamespace, ICloneable.Clone, IEnumerable.GetEnumerator, InsertAfter, InsertBefore, Normalize, PrependChild, RemoveChild, ReplaceChild, SelectNodes, SelectNodes, SelectSingleNode, SelectSingleNode, Supports |
Methods inherited from class System.Object |
---|
Equals, Finalize, GetHashCode, GetType, MemberwiseClone |
Method Detail |
---|
public System.Collections.IList GetAttributes()
This returns the complete set of attributes for this element, as a
NodeListof
Attributeobjects in no particular order, or an empty list if there are none. The returned list is "live" and changes to it affect the element's actual attributes.
Returns:
public System.Xml.XmlNode GetChild(string xpath)
public System.Collections.IList GetChildren(string name, string ns)
This returns a
NodeListof all the child elements nested directly (one level deep) within this element with the given local name and belonging to the given Namespace, returned as
Elementobjects. If this target element has no nested elements with the given name in the given Namespace, an empty List is returned. The returned list is "live" in document order and changes to it affect the element's actual contents. Please see the notes for
{@link #getChildren}for a code example.
Parameters:
name
- local name for the children to matchns
- Namespaceto search within
public System.Collections.IList GetChildren(string name)
This returns a
NodeListof all the child elements nested directly (one level deep) within this element with the given local name and belonging to no namespace, returned as
Elementobjects. If this target element has no nested elements with the given name outside a namespace, an empty List is returned. The returned list is "live" in document order and changes to it affect the element's actual contents. Please see the notes for
{@link #getChildren}for a code example.
Parameters:
name
- local name for the children to matchpublic System.Collections.IList GetChildren()
This returns a
NodeListof all the child elements nested directly (one level deep) within this element, as
Elementobjects. If this target element has no nested elements, an empty List is returned. The returned list is "live" in document order and changes to it affect the element's actual contents. This performs no recursion, so elements nested two levels deep would have to be obtained with:
Iterator itr = currentElement.getChildren().iterator(); while (itr.hasNext()) { Element oneLevelDeep = (Element)nestedElements.next(); List twoLevelsDeep = oneLevelDeep.getChildren(); // Do something with these children }
Returns:
Elementobjects for this element
public System.Collections.IList GetContent()
This returns the full content of the element as a NodeList which may contain objects of type
String,
Element,
Comment,
ProcessingInstruction,
CDATA, and
EntityRef. The List returned is "live" in document order and modifications to it affect the element's actual contents. Whitespace content is returned in its entirety.
Returns:
Listcontaining the mixed content of the element: may contain
String,
{@link Element},
{@link Comment},
{@link ProcessingInstruction},
{@link CDATA}, and
{@link EntityRef}objects.
public string ToString()
Returns the XML serialized form of this element, as produced by the default {@link XMLOutputter}.
|
.NET Framework | |||||||||
PREV TYPE NEXT TYPE | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONST | PROP | METHOD | OP | EVENT | DETAIL: FIELD | CONST | PROP | METHOD | OP | EVENT |