Class XmlElement


  • @Deprecated(forRemoval=true)
    public final class XmlElement
    extends Object
    Deprecated, for removal: This API element is subject to removal in a future version.
    Replaced by OpenDayLight implementation XmlElement.
    XmlElement.
    • Field Detail

      • DEFAULT_NAMESPACE_PREFIX

        public static final String DEFAULT_NAMESPACE_PREFIX
        Deprecated, for removal: This API element is subject to removal in a future version.
        See Also:
        Constant Field Values
    • Method Detail

      • fromDomElement

        public static XmlElement fromDomElement​(Element element)
        Deprecated, for removal: This API element is subject to removal in a future version.
      • fromDomDocument

        public static XmlElement fromDomDocument​(Document xml)
        Deprecated, for removal: This API element is subject to removal in a future version.
      • getName

        public String getName()
        Deprecated, for removal: This API element is subject to removal in a future version.
      • getAttribute

        public String getAttribute​(String attributeName)
        Deprecated, for removal: This API element is subject to removal in a future version.
      • getAttribute

        public String getAttribute​(String attributeName,
                                   String namespace)
        Deprecated, for removal: This API element is subject to removal in a future version.
      • getElementsByTagName

        public NodeList getElementsByTagName​(String name)
        Deprecated, for removal: This API element is subject to removal in a future version.
      • appendChild

        public void appendChild​(Element child)
        Deprecated, for removal: This API element is subject to removal in a future version.
      • getDomElement

        public Element getDomElement()
        Deprecated, for removal: This API element is subject to removal in a future version.
      • getAttributes

        public Map<String,​Attr> getAttributes()
        Deprecated, for removal: This API element is subject to removal in a future version.
      • getChildElements

        public List<XmlElement> getChildElements()
        Deprecated, for removal: This API element is subject to removal in a future version.
      • getChildElements

        public List<XmlElement> getChildElements​(String tagName)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Return all XML elements with specified tag name.
        Parameters:
        tagName - tag name without prefix
        Returns:
        List of child elements
      • getChildElementsWithinNamespace

        public List<XmlElement> getChildElementsWithinNamespace​(String childName,
                                                                String namespace)
        Deprecated, for removal: This API element is subject to removal in a future version.
      • getChildElementsWithinNamespace

        public List<XmlElement> getChildElementsWithinNamespace​(String namespace)
        Deprecated, for removal: This API element is subject to removal in a future version.
      • getOnlyChildElementOptionally

        public com.google.common.base.Optional<XmlElement> getOnlyChildElementOptionally​(String childName)
        Deprecated, for removal: This API element is subject to removal in a future version.
      • getOnlyChildElementOptionally

        public com.google.common.base.Optional<XmlElement> getOnlyChildElementOptionally​(String childName,
                                                                                         String namespace)
        Deprecated, for removal: This API element is subject to removal in a future version.
      • getOnlyChildElementOptionally

        public com.google.common.base.Optional<XmlElement> getOnlyChildElementOptionally()
        Deprecated, for removal: This API element is subject to removal in a future version.
      • getOnlyChildElementWithSameNamespaceOptionally

        public com.google.common.base.Optional<XmlElement> getOnlyChildElementWithSameNamespaceOptionally​(String childName)
        Deprecated, for removal: This API element is subject to removal in a future version.
      • getOnlyChildElementWithSameNamespaceOptionally

        public com.google.common.base.Optional<XmlElement> getOnlyChildElementWithSameNamespaceOptionally()
        Deprecated, for removal: This API element is subject to removal in a future version.
      • getOnlyTextContentOptionally

        public com.google.common.base.Optional<String> getOnlyTextContentOptionally()
        Deprecated, for removal: This API element is subject to removal in a future version.
      • getNamespaceAttributeOptionally

        public com.google.common.base.Optional<String> getNamespaceAttributeOptionally()
        Deprecated, for removal: This API element is subject to removal in a future version.
      • getNamespaceOptionally

        public com.google.common.base.Optional<String> getNamespaceOptionally()
        Deprecated, for removal: This API element is subject to removal in a future version.
      • toString

        public String toString()
        Deprecated, for removal: This API element is subject to removal in a future version.
        Overrides:
        toString in class Object
      • findNamespaceOfTextContent

        public Map.Entry<String,​String> findNamespaceOfTextContent()
                                                                  throws DocumentedException
        Deprecated, for removal: This API element is subject to removal in a future version.
        Search for element's attributes defining namespaces. Look for the one namespace that matches prefix of element's text content. E.g.
         <type
         xmlns:th-java="urn:opendaylight:params:xml:ns:yang:controller:threadpool:impl">th-java:threadfactory-naming
         </type>
         
        returns {"th-java","urn:.."}. If no prefix is matched, then default namespace is returned with empty string as key. If no default namespace is found value will be null.
        Returns:
        prefix - namespace map.
        Throws:
        DocumentedException - namespaces cannot be extracted.
      • checkUnrecognisedElements

        public void checkUnrecognisedElements​(XmlElement... additionalRecognisedElements)
                                       throws DocumentedException
        Deprecated, for removal: This API element is subject to removal in a future version.
        Throws:
        DocumentedException
      • equals

        public boolean equals​(Object obj)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Overrides:
        equals in class Object
      • hashCode

        public int hashCode()
        Deprecated, for removal: This API element is subject to removal in a future version.
        Overrides:
        hashCode in class Object
      • hasNamespace

        public boolean hasNamespace()
        Deprecated, for removal: This API element is subject to removal in a future version.