|
Generated by JDiff |
||||||||
| PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES | |||||||||
This file contains all the changes in documentation in the packagecom.itextpdf.styledxmlparser.jsoup.nodesas colored differences. Deletions are shownlike this, and additions are shown like this.
If no deletions or additions are shown in an entry, the HTML tags will be what has changed. The new HTML tags are shown in the differences. If no documentation existed, and then some was added in a later version, this change is noted in the appropriate class pages of differences, but the change is not shown on this page. Only changes in existing text are shown here. Similarly, documentation which was inherited from another class or interface is not shown here.
Note that an HTML error in the new documentation may cause the display of other documentation changes to be presented incorrectly. For instance, failure to close a tag will cause all subsequent paragraphs to be displayed differently.
A single key + value attribute.Class Attribute, constructor Attribute(String, String)Keys(Onlyare trimmedused forand normalised to lower-case. @author Jonathan Hedley, jonathan@hedleypresentation.net)
Create a new attribute from unencoded (raw) key and value. @param key attributeClass Attribute, String getValue()keykey; case is preserved. @param value attributevaluevalue (may be null) @see #createFromEncoded
Get the attribute value. Will return an empty string if the value is not set. @return the attribute valueClass Attribute, void setKey(String)
Set the attribute keyClass Attribute, String setValue(String). Gets normalised as per;the constructor methodcase is preserved. @param key the new key; must not be null
Set the attribute value. @paramClass Attribute, boolean shouldCollapseAttribute(OutputSettings)valueval the new attribute value; must not be null
Collapsible if it's a boolean attribute and value is empty or same as name @param outOutputsettingsoutput settings @return Returns whether collapsible or not
The attributes of an Element.Class Attributes, ListAttributes are treated as a map: there can be only one value associated with an attribute key/name.
Attribute
keyname and value comparisons aredonegenerally caseinsensitivelysensitive. By default for HTML,and keys are normalised toattribute names are normalized to lower-case on parsing.That means you should use lower-case strings when referring to attributes by name. @author Jonathan Hedley, jonathan@hedley.net
Get the attributes as a List, for iteration.Class Attributes, String get(String)Do not modify the keys of the attributes via this view, as changes to keys will not be recognised in the containing set.@return an view of the attributes asaan unmodifiable List.
Get an attribute value by key. @param key the (case-sensitive) attribute key @return the attribute value if set; or empty string if not set (or a boolean attribute). @see #hasKey(String)Class Attributes, boolean hasKey(String)
Tests if these attributes contain an attribute with this key. @param key case-sensitive key to check for @return true if key exists, false otherwiseClass Attributes, String html()
Get the HTML representation of these attributes. @returnClass Attributes, Attributes put(Attribute)HTML @throws SerializationException if theHTMLrepresentation of the attributes cannot be constructed.
Set a new attribute, or replace an existing one by key. @param attribute attribute with case sensitive key @return these attributes, for chainingClass Attributes, Attributes put(String, String)
Set a new attribute, or replace an existing one by key.Class Attributes, Attributes put(String, boolean)@param keyattribute keycase sensitive attribute key (not null) @param value attribute value (may be null, to set a boolean attribute) @return these attributes, for chaining
Set a new boolean attribute, remove attribute if value is false.Class Attributes, void remove(String)@param keyattribute keycase insensitive attribute key @param value attributevaluevalue @return these attributes, for chaining
Remove an attribute by key. Case sensitive. @param key attribute key to remove
Create a new comment node. @param data The contents of thecomment @param baseUri base URIcomment
Create a new DataNode. @param data dataClass DataNode, DataNode createFromEncoded(String, String)contents @param baseUri base URIcontents
Create a new DataNode from HTML encoded data. @param encodedData encoded data @param baseUribassbase URI @return newDataNodeDataNode @deprecated Unused, and will be removed in 1.15.1.
Create a new, empty Document. @param baseUri base URI of document @see com.itextpdf.styledxmlparser.jsoup.Jsoup#parse @see #createShellClass Document, Element body()
Class Document, void charset(Charset)Accessor toGet thisthedocument's {@codebody} or {@code } element.As a side-effect, if this Document does not already have a HTML structure, it will be created with a {@code } element. If you do not want that, use {@code #selectFirst("body")} instead. @return {@code body} element for documents with a {@code }, a new {@code } element if the document had no contents, or the outermost {@code element} for frameset documents.
Sets the charset used in this document. This method is equivalent to OutputSettings.charset(Charset) but in addition it updates the charset / encoding element within the document.Class Document, Element head()This enables meta charset update.
If there's no element with charset / encoding information yet it
willwill be created. Obsolete charset / encoding definitions are removed!Elements used:
@param charset Charset @see #updateMetaCharsetElement(boolean) @see OutputSettings#charset(java.nio.charset.Charset)
- Html:
- Xml:
Class Document, String location()Accessor toGet thisthedocument's {@code head} element.As a side-effect, if this Document does not already have a HTML structure, it will be created. If you do not want that, use {@code #selectFirst("head")} instead. @return {@code head} element.
Get the URL this Document was parsed from. If the starting URL is a redirect, this will return the final URL from which the document was served from.Class Document, void updateMetaCharsetElement(boolean)Will return an empty string if the location is unknown (e.g. if parsed from a String). @return location
Sets whether the element with charset information in this document is updated on changes through Document.charset(Charset) or not.If set to false (default) there are no
elementselements modified. @param update If true the element updated on charset changes, false if not @see #charset(java.nio.charset.Charset)
Create a new doctype element. @param name the doctype's name @param publicId the doctype's public ID @param systemId the doctype's systemID @param baseUri the doctype's base URIID
A HTML element consists of a tag name, attributes, and child nodes (including text nodes and other elements).Class Element, constructor Element(Tag, String)From an Element, you can extract data, traverse the node graph, and manipulate the HTML.@author Jonathan Hedley, jonathan@hedley.net
Create a new Element from aClass Element, constructor Element(Tag, String, Attributes)tagTag and a base URI.@param tag element tag @param baseUri the base URI of this element.It is acceptable for the base URI to be an emptyOptional, and will inherit from itsstringparent,butifnot nullany. @see Tag#valueOf(String, ParseSettings)
Create a new, standalone Element. (Standalone in that is has no parent.)Class Element, Element addClass(String)@param tag tag of this element @param baseUri the baseURIURI (optional, may be null to inherit from parent, or "" to clear parent's) @param attributes initialattributesattributes (optional, may be null) @see #appendChild(Node) @see #appendElement(String)
Add a class name to this element's {@code class} attribute.Class Element, Element appendChild(Node)@param className class name to add@return this element
Class Element, Element appendElement(String)AddInsert a nodechildtonode tothe end of thiselementElement's children. The incoming node will be re-parented.@param child node to add. @return thiselementElement,so thatforyou can addchainingmore@seechild#prependChild(Node)nodes@seeor#insertChildren(int,elements.Collection)
Create a new element by tag name, and add it as the last child.Class Element, Element appendText(String)@param tagName the name of the tag (e.g. {@code div}). @return the new element, to allow you to add content to it, e.g.: {@code parent.appendElement("h1").attr("id", "header").text("Welcome");}
Create and append a new TextNode to this element.Class Element, Node attr(String, String)@param text the unencoded text to add @return this element
Set an attribute value on this element. If this element already has an attribute with the key, its value is updated; otherwise, a new attribute is added.Class Element, Element attr(String, boolean)@return this element
Set a boolean attribute value on this element. Setting toClass Element, Element child(int)truesets the attribute value to "" and marks the attribute as boolean so no value is written out. Setting tofalseremoves the attribute with the same key if it exists.@param attributeKey the attribute key @param attributeValue the attributevaluevalue @return this element
Get a child element of this element, by its 0-based index number.Class Element, Elements children()Note that an element can have both mixed Nodes and Elements as children. This method inspects a filtered list of children that are elements, and the index is based on that filtered list.
@param index the index number of the element to retrieve @return the child element, if it exists, otherwise throws an {@code IndexOutOfBoundsException} @see #childNode(int)
Get this element's child elements.Class Element, Element classNames(SetThis is effectively a filter on .childNodes() to get Element nodes. @return child elements. If this element has no children, returns
anan empty list. @see #childNodes()
Set the element's {@code class} attribute to the supplied class names.Class Element, String data()@param classNames set of classes@return this element, for chaining
Get the combined data of this element. Data is e.g. the inside of a {@codescript