Uses of Class
org.jdom.Namespace
Packages that use Namespace
Package
Description
Classes to represent the components of an XML document.
Classes to programmatically filter nodes of a document based on type, name,
value, or other aspects and to boolean and/or/negate these rules.
Support for XPath from within JDOM.
-
Uses of Namespace in org.jdom
Modifier and TypeFieldDescriptionprotected NamespaceAttribute.namespaceTheof theNamespaceAttributeprotected NamespaceElement.namespaceThe namespace of the elementstatic final NamespaceNamespace.NO_NAMESPACEDefine aNamespacefor when not in a namespacestatic final NamespaceNamespace.XML_NAMESPACEDefine aNamespacefor the standard xml prefix.Modifier and TypeMethodDescriptionAttribute.getNamespace()This will return thisAttribute's.NamespaceElement.getNamespace()Returns the element'sNamespace.Element.getNamespace(String prefix) Returns theNamespacecorresponding to the given prefix in scope for this element.static NamespaceNamespace.getNamespace(String uri) This will retrieve (if in existence) or create (if not) aNamespacefor the supplied URI, and make it usable as a default namespace, as no prefix is supplied.static NamespaceNamespace.getNamespace(String prefix, String uri) This will retrieve (if in existence) or create (if not) aNamespacefor the supplied prefix and URI.Modifier and TypeMethodDescriptionvoidDefaultJDOMFactory.addNamespaceDeclaration(Element parent, Namespace additional) voidElement.addNamespaceDeclaration(Namespace additionalNamespace) Adds a namespace declarations to this element.voidJDOMFactory.addNamespaceDeclaration(Element element, Namespace additional) voidUncheckedJDOMFactory.addNamespaceDeclaration(Element parent, Namespace additional) This will create a newAttributewith the specified (local) name, value, and type, and in the provided.NamespaceThis will create a newAttributewith the specified (local) name and value, and in the provided.Namespacestatic StringVerifier.checkNamespaceCollision(Namespace namespace, List list) Check if acollides with any namespace from a list of objects.Namespacestatic StringVerifier.checkNamespaceCollision(Namespace namespace, Attribute attribute) static StringVerifier.checkNamespaceCollision(Namespace namespace, Element element) static StringVerifier.checkNamespaceCollision(Namespace namespace, Namespace other) Check if two namespaces collide.This will create a newElementwith the supplied (local) name, and define theto be used.NamespaceElement.getAttribute(String name, Namespace ns) This returns the attribute for this element with the given name and within the given Namespace, or null if no such attribute exists.Element.getAttributeValue(String name, Namespace ns) This returns the attribute value for the attribute with the given name and within the given Namespace, null if there is no such attribute, and the empty string if the attribute value is empty.Element.getAttributeValue(String name, Namespace ns, String def) This returns the attribute value for the attribute with the given name and within the given Namespace, or the passed-in default if there is no such attribute.This returns the first child element within this element with the given local name and belonging to the given namespace.Element.getChildren(String name, 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.Element.getChildText(String name, Namespace ns) Returns the textual content of the named child element, or null if there's no such child.Element.getChildTextNormalize(String name, Namespace ns) Returns the normalized textual content of the named child element, or null if there's no such child.Element.getChildTextTrim(String name, Namespace ns) Returns the trimmed textual content of the named child element, or null if there's no such child.booleanElement.removeAttribute(String name, Namespace ns) This removes the attribute with the given name and within the given Namespace.booleanElement.removeChild(String name, Namespace ns) This removes the first child element (one level deep) with the given local name and belonging to the given namespace.booleanElement.removeChildren(String name, Namespace ns) This removes all child elements (one level deep) with the given local name and belonging to the given namespace.voidElement.removeNamespaceDeclaration(Namespace additionalNamespace) Removes an additional namespace declarations from this element.Element.setAttribute(String name, String value, Namespace ns) This sets an attribute value for this element.Attribute.setNamespace(Namespace namespace) This sets thisAttribute's.NamespaceElement.setNamespace(Namespace namespace) Sets the element'sNamespace.ModifierConstructorDescriptionThis will create a newAttributewith the specified (local) name, value, and type, and in the provided.NamespaceThis will create a newAttributewith the specified (local) name and value, and in the provided.NamespaceCreates a new element with the supplied (local) name and namespace. -
Uses of Namespace in org.jdom.filter
Constructors in org.jdom.filter with parameters of type NamespaceModifierConstructorDescriptionElementFilter(String name, Namespace namespace) Select only the Elements with the supplied name and Namespace.ElementFilter(Namespace namespace) Select only the Elements with the supplied Namespace. -
Uses of Namespace in org.jdom.xpath
Methods in org.jdom.xpath with parameters of type NamespaceModifier and TypeMethodDescriptionabstract voidXPath.addNamespace(Namespace namespace) Adds a namespace definition to the list of namespaces known of this XPath expression.