public final class DOMUtil extends Object
Modifier and Type | Field and Description |
---|---|
static String |
PARSER_HTML |
static String |
PARSER_XML |
Modifier and Type | Method and Description |
---|---|
static String |
getElementValue(org.jsoup.nodes.Element element,
String extract)
Gets an element value based on JSoup DOM.
|
static org.jsoup.parser.Parser |
toJSoupParser(String parser)
Gets the JSoup parser associated with the string representation.
|
public static final String PARSER_HTML
public static final String PARSER_XML
public static org.jsoup.parser.Parser toJSoupParser(String parser)
parser
- "html" or "xml"public static String getElementValue(org.jsoup.nodes.Element element, String extract)
Gets an element value based on JSoup DOM. You control what gets extracted exactly thanks to the "extract" argument. Possible values are:
element
- the element to extract value onextract
- the type of extraction to performElement
Copyright © 2009–2021 Norconex Inc.. All rights reserved.