| java.lang.Object org.springframework.util.xml.DomUtils
DomUtils | abstract public class DomUtils (Code) | | Convenience methods for working with the DOM API,
in particular for working with DOM Nodes and DOM Elements.
author: Juergen Hoeller author: Rob Harrop author: Costin Leau since: 1.2 See Also: org.w3c.dom.Node See Also: org.w3c.dom.Element |
getChildElementByTagName | public static Element getChildElementByTagName(Element ele, String childEleName)(Code) | | Utility method that returns the first child element
identified by its name.
Parameters: ele - the DOM element to analyze Parameters: childEleName - the child element name to look for the org.w3c.dom.Element instance,or null if none found |
getChildElementValueByTagName | public static String getChildElementValueByTagName(Element ele, String childEleName)(Code) | | Utility method that returns the first child element value
identified by its name.
Parameters: ele - the DOM element to analyze Parameters: childEleName - the child element name to look for the extracted text value,or null if no child element found |
getChildElementsByTagName | public static List getChildElementsByTagName(Element ele, String childEleName)(Code) | | Retrieve all child elements of the given DOM element that match
the given element name. Only look at the direct child level of the
given element; do not go into further depth (in contrast to the
DOM API's getElementsByTagName method).
Parameters: ele - the DOM element to analyze Parameters: childEleName - the child element name to look for a List of child org.w3c.dom.Element instances See Also: org.w3c.dom.Element See Also: org.w3c.dom.Element.getElementsByTagName |
getTextValue | public static String getTextValue(Element valueEle)(Code) | | Extract the text value from the given DOM element, ignoring XML comments.
Appends all CharacterData nodes and EntityReference nodes
into a single String value, excluding Comment nodes.
See Also: CharacterData See Also: EntityReference See Also: Comment |
|
|