Class JsoupElementNode
java.lang.Object
com.itextpdf.styledxmlparser.node.impl.jsoup.node.JsoupNode
com.itextpdf.styledxmlparser.node.impl.jsoup.node.JsoupElementNode
- All Implemented Interfaces:
-
IElementNode,INode,IStylesContainer
- Direct Known Subclasses:
-
JsoupDocumentNode
Implementation of the
IElementNode interface; wrapper for the JSoup JsoupNode class.
-
Constructor Summary
ConstructorsConstructorDescriptionJsoupElementNode(com.itextpdf.styledxmlparser.jsoup.nodes.Element element) Creates a newJsoupElementNodeinstance. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAdditionalHtmlStyles(Map<String, String> styles) Adds additional HTML styles.Gets additional styles, more specifically styles that affect an element based on its position in the HTML DOM, e.g.getAttribute(String key) Gets an attribute.Gets the attributes.getLang()Gets the language.Gets the styles.name()Gets the name of the element node.voidSets the styles.text()Returns the element text.Methods inherited from class com.itextpdf.styledxmlparser.node.impl.jsoup.node.JsoupNode
addChild, childNodes, parentNodeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.itextpdf.styledxmlparser.node.INode
addChild, childNodes, parentNode
-
Constructor Details
-
JsoupElementNode
public JsoupElementNode(com.itextpdf.styledxmlparser.jsoup.nodes.Element element) Creates a newJsoupElementNodeinstance.- Parameters:
-
element- the element
-
-
Method Details
-
name
Description copied from interface:IElementNodeGets the name of the element node.- Specified by:
-
namein interfaceIElementNode - Returns:
- the string
-
getAttributes
Description copied from interface:IElementNodeGets the attributes.- Specified by:
-
getAttributesin interfaceIElementNode - Returns:
- the attributes
-
getAttribute
Description copied from interface:IElementNodeGets an attribute.- Specified by:
-
getAttributein interfaceIElementNode - Parameters:
-
key- the key of the attribute we want to get - Returns:
- the value of the attribute
-
setStyles
Description copied from interface:IStylesContainerSets the styles.- Specified by:
-
setStylesin interfaceIStylesContainer - Parameters:
-
elementResolvedStyles- aMapwith style keys and values.
-
getStyles
Description copied from interface:IStylesContainerGets the styles.- Specified by:
-
getStylesin interfaceIStylesContainer - Returns:
- the styles
-
getAdditionalHtmlStyles
Description copied from interface:IElementNodeGets additional styles, more specifically styles that affect an element based on its position in the HTML DOM, e.g. cell borders that are set due to the parent table "border" attribute, or styles from "col" tags that affect table elements, or blocks horizontal alignment that is the result of parent's "align" attribute.- Specified by:
-
getAdditionalHtmlStylesin interfaceIElementNode - Returns:
- the additional html styles
-
addAdditionalHtmlStyles
Description copied from interface:IElementNodeAdds additional HTML styles.- Specified by:
-
addAdditionalHtmlStylesin interfaceIElementNode - Parameters:
-
styles- the styles
-
getLang
Description copied from interface:IElementNodeGets the language.- Specified by:
-
getLangin interfaceIElementNode - Returns:
- the language value
-
text
Returns the element text.- Returns:
- the text
-