Uses of Class
org.jdom2.Element
Packages that use Element
Package
Description
Classes representing the components of an XML document.
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.
Classes to build JDOM documents from various sources.
Support classes for building JDOM documents and content using SAX parsers.
Extended JDOM Content Classes that contain location coordinates.
Classes to output JDOM documents to various destinations.
Classes used to implement output functionality that are not part of the
actual Output API, but rather part of the implementation.
Classes to help with transformations, based on the JAXP TrAX classes.
Classes that implement useful functionality, but are not easy to categorise.
-
Uses of Element in org.jdom2
Modifier and TypeFieldDescriptionprotected ElementAttribute.parentThe parent to which this Attribute belongs.Modifier and TypeMethodDescriptionElement.addContent(int index, Collection<? extends Content> newContent) Inserts the content in a collection into the content list at the given index.Element.addContent(int index, Content child) Inserts the child into the content list at the given index.Element.addContent(String str) This adds text content to this element.Element.addContent(Collection<? extends Content> newContent) Appends all children in the given collection to the end of the content list.Element.addContent(Content child) Appends the child to the end of the element's content list.Element.clone()This returns a deep clone of this element.Element.detach()Document.detachRootElement()Detach the rootfrom this document.Elementfinal Elementfinal Elementfinal Elementfinal ElementThis will create anElementin no.NamespaceThis will create a newElementwith the supplied (local) name, and specifies the URI of thetheNamespaceElementshould be in, resulting it being unprefixed (in the default namespace).This will create a newElementwith the supplied (local) name, and specifies the prefix and URI of thetheNamespaceElementshould be in.This will create a newElementwith the supplied (local) name, and define theto be used.NamespaceThis will create anElementin no.NamespaceThis will create a newElementwith the supplied (local) name, and specifies the URI of thetheNamespaceElementshould be in, resulting it being unprefixed (in the default namespace).This will create a newElementwith the supplied (local) name, and specifies the prefix and URI of thetheNamespaceElementshould be in.This will create a newElementwith the supplied (local) name, and define theto be used.NamespaceThis returns the first child element within this element with the given local name and belonging to no namespace.This returns the first child element within this element with the given local name and belonging to the given namespace.Attribute.getParent()This will return the parent of thisAttribute.EntityRef.getParent()Text.getParent()final ElementContent.getParentElement()A convenience method that returns any parent element for this element, or null if the element is unattached or is a root element.Document.getRootElement()This will return the rootElementfor thisDocumentElement.setAttribute(String name, String value) This sets an attribute value for this element.Element.setAttribute(String name, String value, Namespace ns) This sets an attribute value for this element.Element.setAttribute(Attribute attribute) This sets an attribute value for this element.Element.setAttributes(Collection<? extends Attribute> newAttributes) This sets the attributes of the element.Element.setContent(int index, Content child) Replace the current child the given index with the supplied child.Element.setContent(Collection<? extends Content> newContent) This sets the content of the element.Element.setContent(Content child) Set this element's content to be the supplied child.Sets the (local) name of the element.Element.setNamespace(Namespace namespace) Sets the element'sNamespace.Sets the content of the element to be the text given.Modifier and TypeMethodDescriptionElement.getChildren()This returns aListof all the child elements nested directly (one level deep) within this element, asElementobjects.Element.getChildren(String cname) This returns aListof all the child elements nested directly (one level deep) within this element with the given local name and belonging to no namespace, returned asElementobjects.Element.getChildren(String cname, Namespace ns) This returns aListof all the child elements nested directly (one level deep) within this element with the given local name and belonging to the given Namespace, returned asElementobjects.Modifier and TypeMethodDescriptionvoidDefaultJDOMFactory.addNamespaceDeclaration(Element parent, Namespace additional) voidJDOMFactory.addNamespaceDeclaration(Element element, Namespace additional) Adds a namespace declaration to an ElementvoidUncheckedJDOMFactory.addNamespaceDeclaration(Element parent, Namespace additional) static StringVerifier.checkNamespaceCollision(Attribute attribute, Element element) static StringVerifier.checkNamespaceCollision(Attribute attribute, Element element, int ignoreatt) static StringVerifier.checkNamespaceCollision(Namespace namespace, Element element) static StringVerifier.checkNamespaceCollision(Namespace namespace, Element element, int ignoreatt) booleanElement.isAncestor(Element element) Determines if this element is the ancestor of another element.voidDefaultJDOMFactory.setAttribute(Element parent, Attribute a) voidJDOMFactory.setAttribute(Element element, Attribute a) Sets a specific Attribute on an ElementvoidUncheckedJDOMFactory.setAttribute(Element parent, Attribute a) protected AttributeSet this Attribute's parent.voidvoidSets the 'root' Element for a Document.voidDocument.setRootElement(Element rootElement) This sets the rootfor theElementDocument.Modifier and TypeMethodDescriptionvoidElement.sortChildren(Comparator<? super Element> comparator) Sort the child Elements of this Element using a mechanism that is safe for JDOM content.ModifierConstructorDescription -
Uses of Element in org.jdom2.filter
Subclasses with type arguments of type Element in org.jdom2.filterMethods in org.jdom2.filter that return ElementModifier and TypeMethodDescriptionCheck to see if the object matches a predefined set of rules.Methods in org.jdom2.filter that return types with arguments of type ElementModifier and TypeMethodDescriptionFilters.element()Return a Filter that matches anyElementdata.Return a Filter that matches anyElementdata with the specified name.Return a Filter that matches anyElementdata with the specified name and Namespace.Return a Filter that matches anyElementdata with the specified Namespace. -
Uses of Element in org.jdom2.input
Methods in org.jdom2.input that return Element -
Uses of Element in org.jdom2.input.sax
Methods in org.jdom2.input.sax that return ElementModifier and TypeMethodDescriptionSAXHandler.getCurrentElement()Returns the being-parsed element.Methods in org.jdom2.input.sax with parameters of type ElementModifier and TypeMethodDescriptionprotected voidSAXHandler.pushElement(Element element) Pushes an element onto the tree under construction. -
Uses of Element in org.jdom2.located
Subclasses of Element in org.jdom2.locatedModifier and TypeClassDescriptionclassThis Element specialization contains the location information as parsed.Methods in org.jdom2.located that return ElementModifier and TypeMethodDescription -
Uses of Element in org.jdom2.output
Methods in org.jdom2.output with parameters of type ElementModifier and TypeMethodDescriptionThis converts the JDOMElementparameter to a DOM Element, returning the DOM version.This converts the JDOMElementparameter to a DOM Element, returning the DOM version.voidThis will output a single JDOM element as a document, firing off the SAX events that have been registered.final voidStAXEventOutputter.output(Element element, XMLEventConsumer out) final voidStAXStreamOutputter.output(Element element, XMLStreamWriter out) final voidXMLOutputter.output(Element element, OutputStream out) final voidfinal voidStAXEventOutputter.outputElementContent(Element element, XMLEventConsumer out) This will handle printing out an's content only, not including its tag, and attributes.Elementfinal voidStAXStreamOutputter.outputElementContent(Element element, XMLStreamWriter out) This will handle printing out an's content only, not including its tag, and attributes.Elementfinal voidXMLOutputter.outputElementContent(Element element, OutputStream out) This will handle printing out an's content only, not including its tag, and attributes.Elementfinal voidXMLOutputter.outputElementContent(Element element, Writer out) This will handle printing out an's content only, not including its tag, and attributes.Elementfinal StringXMLOutputter.outputElementContentString(Element element) This will handle printing out an's content only, not including its tag, and attributes.Elementfinal StringXMLOutputter.outputString(Element element) Return a string representing anElement. -
Uses of Element in org.jdom2.output.support
Methods in org.jdom2.output.support with parameters of type ElementModifier and TypeMethodDescriptionprotected ElementAbstractDOMOutputProcessor.printElement(FormatStack fstack, NamespaceStack nstack, Document basedoc, Element element) This will handle printing of anElement.protected voidAbstractSAXOutputProcessor.printElement(SAXTarget out, FormatStack fstack, NamespaceStack nstack, Element element) This will handle printing of anElement.protected voidAbstractStAXEventProcessor.printElement(XMLEventConsumer out, FormatStack fstack, NamespaceStack nstack, XMLEventFactory eventfactory, Element element) This will handle printing of anElement.protected voidAbstractStAXStreamProcessor.printElement(XMLStreamWriter out, FormatStack fstack, NamespaceStack nstack, Element element) This will handle printing of anElement.protected voidAbstractXMLOutputProcessor.printElement(Writer out, FormatStack fstack, NamespaceStack nstack, Element element) This will handle printing of anElement.voidvoidAbstractStAXEventProcessor.process(XMLEventConsumer out, Format format, XMLEventFactory eventfactory, Element element) voidAbstractStAXStreamProcessor.process(XMLStreamWriter out, Format format, Element element) voidThis will convert theusing the given DOM Document to create the resulting DOM Element.ElementvoidvoidStAXEventProcessor.process(XMLEventConsumer out, Format format, XMLEventFactory eventfactory, Element element) voidStAXStreamProcessor.process(XMLStreamWriter out, Format format, Element element) voidvoidAbstractSAXOutputProcessor.processAsDocument(SAXTarget out, Format format, Element node) voidSAXOutputProcessor.processAsDocument(SAXTarget out, Format format, Element element) -
Uses of Element in org.jdom2.transform
Constructors in org.jdom2.transform with parameters of type ElementModifierConstructorDescriptionJDOMSource(Element source) Creates a JDOM TrAX source wrapping a JDOM element. -
Uses of Element in org.jdom2.util
Methods in org.jdom2.util with parameters of type Element