| Package | Description | 
|---|---|
| org.jdom2 | Classes representing the components of an XML document. | 
| org.jdom2.filter | Classes to both filter and generically type-cast nodes of a document
        based on type, name, value, or other aspects, and to boolean
        AND/OR/NEGATE these rules. | 
| org.jdom2.input | Classes to build JDOM documents from various sources. | 
| org.jdom2.located | Extended JDOM Content Classes that contain location coordinates. | 
| org.jdom2.output | Classes to output JDOM documents to various destinations. | 
| org.jdom2.output.support | Classes used to implement output functionality that are not part of the
        actual Output API, but rather part of the implementation. | 
| org.jdom2.transform | Classes to help with transformations, based on the JAXP TrAX classes. | 
| org.jdom2.xpath | Support for XPath from within JDOM. | 
| Modifier and Type | Class and Description | 
|---|---|
| class  | CDATAAn XML CDATA section. | 
| class  | CommentAn XML comment. | 
| class  | DocTypeAn XML DOCTYPE declaration. | 
| class  | ElementAn XML element. | 
| class  | EntityRefAn XML entity reference. | 
| class  | ProcessingInstructionAn XML processing instruction. | 
| class  | TextAn XML character sequence. | 
| Modifier and Type | Method and Description | 
|---|---|
| <E extends Content> | Parent. getContent(Filter<E> filter)Returns as a  Listthe content of
 this parent that matches the supplied filter. | 
| <E extends Content> | Element. getContent(Filter<E> filter)Return a filter view of this  Element's content. | 
| <F extends Content> | Document. getContent(Filter<F> filter)Return a filtered view of this  Document's content. | 
| <E extends Content> | Parent. getDescendants(Filter<E> filter)Returns an  Iteratorthat walks over all descendants
 in document order applying the Filter to return only content that
 match the filter rule. | 
| <F extends Content> | Document. getDescendants(Filter<F> filter)Returns an iterator that walks over all descendants in document order
 applying the Filter to return only elements that match the filter rule. | 
| <F extends Content> | Element. getDescendants(Filter<F> filter)Returns an iterator that walks over all descendants in document order
 applying the Filter to return only content that match the filter rule. | 
| <E extends Content> | Parent. removeContent(Filter<E> filter)Removes from this parent all child content matching the given filter
 and returns a list of the detached children. | 
| <F extends Content> | Document. removeContent(Filter<F> filter)Remove all child content from this parent matching the supplied filter. | 
| <F extends Content> | Element. removeContent(Filter<F> filter)Remove all child content from this parent matching the supplied filter. | 
| <E extends Content> | Element. sortContent(Filter<E> filter,
           java.util.Comparator<? super E> comparator)Sort the child content of this Element that matches the Filter, using a
 mechanism that is safe for JDOM content. | 
| Modifier and Type | Method and Description | 
|---|---|
| Content | Content. clone() | 
| Content | Content. detach()Detaches this child from its parent or does nothing if the child
 has no parent. | 
| Content | Parent. getContent(int index)Returns the child at the given index. | 
| Content | Document. getContent(int index) | 
| Content | Element. getContent(int index) | 
| Content | Parent. removeContent(int index)Removes and returns the child at the given
 index, or returns null if there's no such child. | 
| Content | Document. removeContent(int index) | 
| Content | Element. removeContent(int index) | 
| protected Content | Content. setParent(Parent parent)Sets the parent of this Content. | 
| Modifier and Type | Method and Description | 
|---|---|
| java.util.List<Content> | Parent. cloneContent()Returns a list containing detached clones of this parent's content list. | 
| java.util.List<Content> | Document. cloneContent() | 
| java.util.List<Content> | Element. cloneContent() | 
| java.util.List<Content> | Parent. getContent()Returns the full content of this parent as a  Listwhich contains objects of typeContent. | 
| java.util.List<Content> | Document. getContent()This will return all content for the  Document. | 
| java.util.List<Content> | Element. getContent()This returns the full content of the element as a List which
 may contain objects of type  Text,Element,Comment,ProcessingInstruction,CDATA, andEntityRef. | 
| IteratorIterable<Content> | Parent. getDescendants()Returns an  Iteratorthat walks over all descendants
 in document order. | 
| IteratorIterable<Content> | Document. getDescendants()Returns an iterator that walks over all descendants in document order. | 
| IteratorIterable<Content> | Element. getDescendants()Returns an iterator that walks over all descendants in document order. | 
| java.util.List<Content> | Parent. removeContent()Removes all content from this parent and returns the detached
 children. | 
| java.util.List<Content> | Document. removeContent()Removes all child content from this parent. | 
| java.util.List<Content> | Element. removeContent()Removes all child content from this parent. | 
| Modifier and Type | Method and Description | 
|---|---|
| Parent | Parent. addContent(Content child)Appends the child to the end of the content list. | 
| Document | Document. addContent(Content child)Appends the child to the end of the content list. | 
| Element | Element. addContent(Content child)Appends the child to the end of the element's content list. | 
| Parent | Parent. addContent(int index,
          Content child)Inserts the child into the content list at the given index. | 
| Document | Document. addContent(int index,
          Content child)Inserts the child into the content list at the given index. | 
| Element | Element. addContent(int index,
          Content child)Inserts the child into the content list at the given index. | 
| void | UncheckedJDOMFactory. addContent(Parent parent,
          Content child) | 
| void | JDOMFactory. addContent(Parent parent,
          Content content)This will add the specified content to the specified parent instance | 
| void | DefaultJDOMFactory. addContent(Parent parent,
          Content child) | 
| void | Parent. canContainContent(Content content,
                 int index,
                 boolean replace)Test whether this Parent instance can contain the specified content
 at the specified position. | 
| void | Document. canContainContent(Content child,
                 int index,
                 boolean replace) | 
| void | Element. canContainContent(Content child,
                 int index,
                 boolean replace) | 
| int | Parent. indexOf(Content child)Returns the index of the supplied child in the content list,
 or -1 if not a child of this parent. | 
| int | Document. indexOf(Content child) | 
| int | Element. indexOf(Content child) | 
| boolean | Parent. removeContent(Content child)Removes a single child node from the content list. | 
| boolean | Document. removeContent(Content child) | 
| boolean | Element. removeContent(Content child) | 
| Document | Document. setContent(Content child)Set this document's content to be the supplied child. | 
| Element | Element. setContent(Content child)Set this element's content to be the supplied child. | 
| Document | Document. setContent(int index,
          Content child)Replace the current child the given index with the supplied child. | 
| Element | Element. setContent(int index,
          Content child)Replace the current child the given index with the supplied child. | 
| Modifier and Type | Method and Description | 
|---|---|
| Parent | Parent. addContent(java.util.Collection<? extends Content> c)Appends all children in the given collection to the end of
 the content list. | 
| Document | Document. addContent(java.util.Collection<? extends Content> c)Appends all children in the given collection to the end of
 the content list. | 
| Element | Element. addContent(java.util.Collection<? extends Content> newContent)Appends all children in the given collection to the end of
 the content list. | 
| Parent | Parent. addContent(int index,
          java.util.Collection<? extends Content> c)Inserts the content in a collection into the content list
 at the given index. | 
| Document | Document. addContent(int index,
          java.util.Collection<? extends Content> c)Inserts the content in a collection into the content list
 at the given index. | 
| Element | Element. addContent(int index,
          java.util.Collection<? extends Content> newContent)Inserts the content in a collection into the content list
 at the given index. | 
| Document | Document. setContent(java.util.Collection<? extends Content> newContent)This sets the content of the  Document. | 
| Element | Element. setContent(java.util.Collection<? extends Content> newContent)This sets the content of the element. | 
| Document | Document. setContent(int index,
          java.util.Collection<? extends Content> collection)Replace the child at the given index with the supplied
 collection. | 
| Parent | Element. setContent(int index,
          java.util.Collection<? extends Content> newContent)Replace the child at the given index with the supplied
 collection. | 
| void | Element. sortContent(java.util.Comparator<? super Content> comparator)Sort the contents of this Element using a mechanism that is safe for JDOM
 content. | 
| Constructor and Description | 
|---|
| Document(java.util.List<? extends Content> content)This will create a new  Document,
 with the supplied list of content, and adeclaration only if the content
 contains a DocType instance. | 
| Modifier and Type | Method and Description | 
|---|---|
| Content | ContentFilter. filter(java.lang.Object obj)Check to see if the object matches according to the filter mask. | 
| Modifier and Type | Method and Description | 
|---|---|
| static Filter<Content> | Filters. content()Return a Filter that matches any  Contentdata. | 
| Filter<? extends Content> | AbstractFilter. or(Filter<?> filter) | 
| Modifier and Type | Method and Description | 
|---|---|
| Content | StAXStreamBuilder. fragment(javax.xml.stream.XMLStreamReader reader)Read the current XML Fragment from the XMLStreamReader. | 
| Modifier and Type | Method and Description | 
|---|---|
| java.util.List<Content> | StAXStreamBuilder. buildFragments(javax.xml.stream.XMLStreamReader reader,
              StAXFilter filter)Read the entire XMLStreamReader and from it build a list of Content that
 conforms to the rules in the supplied StAXFilter. | 
| Modifier and Type | Class and Description | 
|---|---|
| class  | LocatedCDATAAn XML CDATA section. | 
| class  | LocatedCommentAn XML comment. | 
| class  | LocatedDocTypeAn XML DOCTYPE declaration. | 
| class  | LocatedElementThis Element specialization contains the location information as parsed. | 
| class  | LocatedEntityRefAn XML entity reference. | 
| class  | LocatedProcessingInstructionAn XML processing instruction. | 
| class  | LocatedTextAn XML character sequence. | 
| Modifier and Type | Method and Description | 
|---|---|
| void | SAXOutputter. outputFragment(Content node)This will output a single JDOM nodes as a fragment of an XML document,
 firing off the SAX events that have been registered. | 
| Modifier and Type | Method and Description | 
|---|---|
| java.util.List<org.w3c.dom.Node> | DOMOutputter. output(org.w3c.dom.Document basedoc,
      java.util.List<? extends Content> list)This converts the list of JDOM  Contentin to a list of DOM
 Nodes, returning the DOM version. | 
| void | SAXOutputter. output(java.util.List<? extends Content> nodes)This will output a list of JDOM nodes as a document, firing off the SAX
 events that have been registered. | 
| java.util.List<org.w3c.dom.Node> | DOMOutputter. output(java.util.List<? extends Content> list)This converts the JDOM  Attributeparameter to a DOM Attr
 Node, returning the DOM version. | 
| void | XMLOutputter. output(java.util.List<? extends Content> list,
      java.io.OutputStream out)This will handle printing out a list of nodes. | 
| void | XMLOutputter. output(java.util.List<? extends Content> list,
      java.io.Writer out)This will handle printing out a list of nodes. | 
| void | StAXEventOutputter. output(java.util.List<? extends Content> list,
      javax.xml.stream.util.XMLEventConsumer out)This will handle printing out a list of nodes. | 
| void | StAXStreamOutputter. output(java.util.List<? extends Content> list,
      javax.xml.stream.XMLStreamWriter out)This will handle printing out a list of nodes. | 
| void | SAXOutputter. outputFragment(java.util.List<? extends Content> nodes)This will output a list of JDOM nodes as a fragment of an XML document,
 firing off the SAX events that have been registered. | 
| java.lang.String | XMLOutputter. outputString(java.util.List<? extends Content> list)Return a string representing a List of  Contentnodes. | 
| Modifier and Type | Method and Description | 
|---|---|
| protected Content | AbstractFormattedWalker. get(int index)Get the content at a position in the input content. | 
| Content | WalkerPRESERVE. next() | 
| Content | AbstractFormattedWalker. next() | 
| Content | Walker. next()Similar to an Iterator, but null return values need special treatment. | 
| Modifier and Type | Method and Description | 
|---|---|
| void | AbstractFormattedWalker.MultiText. appendRaw(Content c)Add some JDOM Content (typically an EntityRef) that will be treated
 as part of the Text-like sequence. | 
| protected org.w3c.dom.Node | AbstractDOMOutputProcessor. helperContentDispatcher(FormatStack fstack,
                       NamespaceStack nstack,
                       org.w3c.dom.Document basedoc,
                       Content content)This method contains code which is reused in a number of places. | 
| Modifier and Type | Method and Description | 
|---|---|
| protected Walker | AbstractOutputProcessor. buildWalker(FormatStack fstack,
           java.util.List<? extends Content> content,
           boolean escape)Create a walker to process Content List values. | 
| java.util.List<org.w3c.dom.Node> | DOMOutputProcessor. process(org.w3c.dom.Document basedoc,
       Format format,
       java.util.List<? extends Content> list)This will convert the list of JDOM  using the
 given DOM Document to create the resulting list of DOM Nodes. | 
| java.util.List<org.w3c.dom.Node> | AbstractDOMOutputProcessor. process(org.w3c.dom.Document basedoc,
       Format format,
       java.util.List<? extends Content> list) | 
| void | SAXOutputProcessor. process(SAXTarget out,
       Format format,
       java.util.List<? extends Content> list)This will handle printing out a list of nodes. | 
| void | AbstractSAXOutputProcessor. process(SAXTarget out,
       Format format,
       java.util.List<? extends Content> list) | 
| void | XMLOutputProcessor. process(java.io.Writer out,
       Format format,
       java.util.List<? extends Content> list)This will handle printing out a list of nodes. | 
| void | AbstractXMLOutputProcessor. process(java.io.Writer out,
       Format format,
       java.util.List<? extends Content> list) | 
| void | AbstractStAXEventProcessor. process(javax.xml.stream.util.XMLEventConsumer out,
       Format format,
       javax.xml.stream.XMLEventFactory eventfactory,
       java.util.List<? extends Content> list) | 
| void | StAXEventProcessor. process(javax.xml.stream.util.XMLEventConsumer out,
       Format format,
       javax.xml.stream.XMLEventFactory eventfactory,
       java.util.List<? extends Content> list)This will handle printing out a list of nodes. | 
| void | StAXStreamProcessor. process(javax.xml.stream.XMLStreamWriter out,
       Format format,
       java.util.List<? extends Content> list)This will handle printing out a list of nodes. | 
| void | AbstractStAXStreamProcessor. process(javax.xml.stream.XMLStreamWriter out,
       Format format,
       java.util.List<? extends Content> list) | 
| void | SAXOutputProcessor. processAsDocument(SAXTarget out,
                 Format format,
                 java.util.List<? extends Content> list)This will handle printing out a list of nodes that is encapsulated in
 start/end Document SAX events. | 
| void | AbstractSAXOutputProcessor. processAsDocument(SAXTarget out,
                 Format format,
                 java.util.List<? extends Content> nodes) | 
| Constructor and Description | 
|---|
| AbstractFormattedWalker(java.util.List<? extends Content> xx,
                       FormatStack fstack,
                       boolean doescape)Create a Walker that preserves all content in its raw state. | 
| WalkerNORMALIZE(java.util.List<? extends Content> content,
               FormatStack fstack,
               boolean escape)Create the Trimmed walker instance. | 
| WalkerPRESERVE(java.util.List<? extends Content> content)Create a Walker that preserves all content in its raw state. | 
| WalkerTRIM_FULL_WHITE(java.util.List<? extends Content> content,
                     FormatStack fstack,
                     boolean escape)Create the Trimmed walker instance. | 
| WalkerTRIM(java.util.List<? extends Content> content,
          FormatStack fstack,
          boolean escape)Create the Trimmed walker instance. | 
| Modifier and Type | Method and Description | 
|---|---|
| java.util.List<? extends Content> | JDOMSource. getNodes()Returns the source node list used by this TrAX source. | 
| java.util.List<Content> | JDOMResult. getResult()Returns the result of an XSL Transformation as a list of JDOM
 nodes. | 
| java.util.List<Content> | XSLTransformer. transform(java.util.List<Content> inputNodes)Transforms the given input nodes to a list of output nodes. | 
| Modifier and Type | Method and Description | 
|---|---|
| void | JDOMSource. setNodes(java.util.List<? extends Content> source)Sets the source node list used by this TrAX source. | 
| void | JDOMResult. setResult(java.util.List<Content> result)Sets the object(s) produced as result of an XSL Transformation. | 
| java.util.List<Content> | XSLTransformer. transform(java.util.List<Content> inputNodes)Transforms the given input nodes to a list of output nodes. | 
| Constructor and Description | 
|---|
| JDOMSource(java.util.List<? extends Content> source)Creates a JDOM TrAX source wrapping a list of JDOM nodes. | 
| Modifier and Type | Method and Description | 
|---|---|
| static java.lang.String | XPathHelper. getAbsolutePath(Content to)Returns the absolute path to the specified to Content. | 
| static java.lang.String | XPathHelper. getRelativePath(Attribute from,
               Content to)Returns the relative path from the given from Attribute to the specified
 to Content as an XPath expression. | 
| static java.lang.String | XPathHelper. getRelativePath(Content from,
               Attribute to)Returns the relative path from the given from Content to the specified to
 Attribute as an XPath expression. | 
| static java.lang.String | XPathHelper. getRelativePath(Content from,
               Content to)Returns the relative path from the given from Content to the specified to
 Content as an XPath expression. | 
Copyright © 2021 Jason Hunter, Brett McLaughlin. All Rights Reserved.