Uses of Class
org.jdom.Element
Packages that use Element
Package
Description
Classes to represent the components of an XML document.
Classes to build JDOM documents from various sources.
Classes to output JDOM documents to various destinations.
Classes to help with transformations, based on the JAXP TrAX classes.
-
Uses of Element in org.jdom
Modifier and TypeFieldDescriptionprotected ElementAttribute.parentParent element, or null if noneModifier and TypeMethodDescriptionElement.addContent(int index, Collection 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 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.Document.detachRootElement()Detach the rootfrom this document.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 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.Content.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 newAttributes) This sets the attributes of the element.Element.setAttributes(List 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 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 TypeMethodDescriptionvoidDefaultJDOMFactory.addNamespaceDeclaration(Element parent, Namespace additional) voidJDOMFactory.addNamespaceDeclaration(Element element, Namespace additional) voidUncheckedJDOMFactory.addNamespaceDeclaration(Element parent, Namespace additional) static StringVerifier.checkNamespaceCollision(Attribute attribute, Element element) static StringVerifier.checkNamespaceCollision(Namespace namespace, Element element) 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) voidUncheckedJDOMFactory.setAttribute(Element parent, Attribute a) protected AttributeThis will set the parent of thisAttribute.Document.setRootElement(Element rootElement) This sets the rootfor theElementDocument.ModifierConstructorDescription -
Uses of Element in org.jdom.input
Methods in org.jdom.input that return ElementModifier and TypeMethodDescriptionThis will build a JDOM Element from an existing DOM ElementSAXHandler.getCurrentElement()Returns the being-parsed element.Methods in org.jdom.input with parameters of type ElementModifier and TypeMethodDescriptionprotected voidSAXHandler.pushElement(Element element) Pushes an element onto the tree under construction. -
Uses of Element in org.jdom.output
Methods in org.jdom.output with parameters of type ElementModifier and TypeMethodDescriptionvoidThis will output a single JDOM element as a document, firing off the SAX events that have been registered.voidXMLOutputter.output(Element element, OutputStream out) voidvoidXMLOutputter.outputElementContent(Element element, OutputStream out) This will handle printing out an's content only, not including its tag, and attributes.ElementvoidXMLOutputter.outputElementContent(Element element, Writer out) This will handle printing out an's content only, not including its tag, and attributes.ElementXMLOutputter.outputString(Element element) Return a string representing an element.protected voidXMLOutputter.printAttributes(Writer out, List attributes, Element parent, XMLOutputter.NamespaceStack namespaces) This will handle printing of alist.Attributeprotected voidXMLOutputter.printElement(Writer out, Element element, int level, XMLOutputter.NamespaceStack namespaces) -
Uses of Element in org.jdom.transform
Constructors in org.jdom.transform with parameters of type ElementModifierConstructorDescriptionJDOMSource(Element source) Creates a JDOM TrAX source wrapping a JDOM element.