public class JsoupElementNode extends JsoupNode implements IElementNode
IElementNode
interface; wrapper for the JSoup JsoupNode
class.
Constructor and Description |
---|
JsoupElementNode(Element element)
Creates a new JsoupElementNode instance.
|
Modifier and Type | Method and Description |
---|---|
void |
addAdditionalHtmlStyles(Map<String,String> styles)
Adds additional HTML styles.
|
List<Map<String,String>> |
getAdditionalHtmlStyles()
Gets additional styles, more specifically styles that affect an element based on its position in the HTML DOM, e.g.
|
String |
getAttribute(String key)
Gets an attribute.
|
IAttributes |
getAttributes()
Gets the attributes.
|
String |
getLang()
Gets the language.
|
Map<String,String> |
getStyles()
Gets the styles.
|
String |
name()
Gets the name of the element node.
|
void |
setStyles(Map<String,String> elementResolvedStyles)
Sets the styles.
|
String |
text()
Returns the element text.
|
addChild, childNodes, parentNode
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addChild, childNodes, parentNode
public JsoupElementNode(Element element)
JsoupElementNode
instance.
element
- the element
public String name()
IElementNode
name
in interface IElementNode
public IAttributes getAttributes()
IElementNode
getAttributes
in interface IElementNode
public String getAttribute(String key)
IElementNode
getAttribute
in interface IElementNode
key
- the key of the attribute we want to get
public void setStyles(Map<String,String> elementResolvedStyles)
IStylesContainer
setStyles
in interface IStylesContainer
elementResolvedStyles
- a Map
with style keys and values.
public Map<String,String> getStyles()
IStylesContainer
getStyles
in interface IStylesContainer
public List<Map<String,String>> getAdditionalHtmlStyles()
IElementNode
getAdditionalHtmlStyles
in interface IElementNode
public void addAdditionalHtmlStyles(Map<String,String> styles)
IElementNode
addAdditionalHtmlStyles
in interface IElementNode
styles
- the styles
public String getLang()
IElementNode
getLang
in interface IElementNode
public String text()
Copyright © 1998–2019 iText Group NV. All rights reserved.