com.aspose.html.collections

Class NamedNodeMap

    • Constructor Detail

      • NamedNodeMap

        public NamedNodeMap(Element element)

        Initializes a new instance of the NamedNodeMap class.

        Parameters:
        element - The element.
    • Method Detail

      • contains

        public static boolean contains(Element element,
                                       Attr attr)
      • getAttribute

        public static Attr getAttribute(java.lang.String qualifiedName,
                                        Element element)
      • getAttribute

        public static Attr getAttribute(java.lang.String namespace,
                                        java.lang.String localName,
                                        Element element)
      • setAttribute

        public static Attr setAttribute(Attr attr,
                                        Element element)
      • removeAttribute

        public static Attr removeAttribute(java.lang.String qualifiedName,
                                           Element element)
      • removeAttribute

        public static Attr removeAttribute(java.lang.String namespace,
                                           java.lang.String localName,
                                           Element element)
      • getAttributeValue

        public static java.lang.String getAttributeValue(Element element,
                                                         java.lang.String namespace,
                                                         java.lang.String localName)
      • setAttribute

        public static void setAttribute(Element element,
                                        java.lang.String localName,
                                        java.lang.String value,
                                        java.lang.String prefix,
                                        java.lang.String namespace)
      • replace

        public static void replace(Attr oldAttr,
                                   Attr newAttr,
                                   Element element)
      • append

        public static void append(Attr attr,
                                  Element element)
      • remove

        public static void remove(Attr attr,
                                  Element element)
      • get_Item

        @DOMNameAttribute(name="item")
        public Attr get_Item(int index)

        Returns the indexth item in the map. If index is greater than or equal to the number of nodes in this map, this returns null.

        Specified by:
        get_Item in interface IDOMCollectionIndexer<Attr>
        Parameters:
        index - The index. Value: The Attr.
        Returns:
        Returns node.
      • get_Item

        public Attr get_Item(java.lang.String name)

        Gets the Attr with the specified name.

        Parameters:
        name - The attribute name. Value: The Attr.
        Returns:
        Returns node.
      • getNamedItem

        @DOMNameAttribute(name="getNamedItem")
        public Attr getNamedItem(java.lang.String name)

        Retrieves a node specified by name.

        Parameters:
        name - The node name.
        Returns:
        Returns node.
      • getNamedItemNS

        @DOMNameAttribute(name="getNamedItemNS")
        public Attr getNamedItemNS(java.lang.String namespaceURI,
                                                                            java.lang.String localName)

        Retrieves a node specified by local name and namespace URI.

        Parameters:
        namespaceURI - The namespace URI.
        localName - Name of the local.
        Returns:
        Returns node.
      • setNamedItem

        @DOMNameAttribute(name="setNamedItem")
        public Attr setNamedItem(Attr attr)

        Adds a node using its nodeName attribute. If a node with that name is already present in this map, it is replaced by the new one. Replacing a node by itself has no effect.

        Parameters:
        attr - The attribute.
        Returns:
        Returns node.
        Throws:
        DOMException
      • setNamedItemNS

        @DOMNameAttribute(name="setNamedItemNS")
        public Attr setNamedItemNS(Attr attr)

        Adds a node using its namespaceURI and localName. If a node with that namespace URI and that local name is already present in this map, it is replaced by the new one. Replacing a node by itself has no effect.

        Parameters:
        attr - The attribute.
        Returns:
        Returns node.
        Throws:
        DOMException
      • removeNamedItem

        @DOMNameAttribute(name="removeNamedItem")
        public Attr removeNamedItem(java.lang.String name)

        Removes a node specified by name.

        Parameters:
        name - The element name.
        Returns:
        Removed node.
      • removeNamedItemNS

        @DOMNameAttribute(name="removeNamedItemNS")
        public Attr removeNamedItemNS(java.lang.String namespaceURI,
                                                                                  java.lang.String localName)

        Removes a node specified by local name and namespace URI.

        Parameters:
        namespaceURI - The namespace URI.
        localName - Name of the local.
        Returns:
        Returns node.
      • iterator

        public com.aspose.ms.System.Collections.Generic.IGenericEnumerator<Attr> iterator()

        Returns an enumerator that iterates through the collection.

        Specified by:
        iterator in interface com.aspose.ms.System.Collections.Generic.IGenericEnumerable<Attr>
        Specified by:
        iterator in interface com.aspose.ms.System.Collections.IEnumerable<Attr>
        Specified by:
        iterator in interface java.lang.Iterable<Attr>
        Returns:
        A System.Collections.Generic.IEnumerator`1 that can be used to iterate through the collection.
      • subscribe

        public com.aspose.ms.System.IDisposable subscribe(com.aspose.html.common.IObserver<Attr> observer)

        Returns an enumerator that iterates through a collection.

        Specified by:
        subscribe in interface com.aspose.html.common.IObservable<Attr>
        Returns:
        An IEnumerator object that can be used to iterate through the collection.
      • notifyAttributeChanged

        public void notifyAttributeChanged(Attr attr)
      • dispose

        public void dispose()
        Specified by:
        dispose in interface com.aspose.ms.System.IDisposable