public class DomUtils extends Object
Utilities used to manipulate the DOM.
Constructor and Description |
---|
DomUtils() |
Modifier and Type | Method and Description |
---|---|
static org.thymeleaf.dom.Element |
findElement(org.thymeleaf.dom.Element element,
String elementName)
Recursive search for an element within the given node in the DOM tree.
|
static org.thymeleaf.dom.Element |
findElement(org.thymeleaf.dom.Element element,
String elementName,
String attributeName,
String attributeValue)
Recursive search for an element, with a particular attribute/value pair,
within the given node in the DOM tree.
|
public static org.thymeleaf.dom.Element findElement(org.thymeleaf.dom.Element element, String elementName)
Recursive search for an element within the given node in the DOM tree.
Many thanks to Emanuel Rabina :-)
element
- Node to initiate the search from.elementName
- Name of the element to look for.public static org.thymeleaf.dom.Element findElement(org.thymeleaf.dom.Element element, String elementName, String attributeName, String attributeValue)
Recursive search for an element, with a particular attribute/value pair, within the given node in the DOM tree.
element
- Node to initiate the search from.elementName
- Name of the element to look for.attributeName
- Attribute that the element must have.attributeValue
- Value of the attribute that the element must have.Copyright © 2013–2015 Dandelion Project. All rights reserved.