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(String qualifiedName,
                                        Element element)
      • setAttribute

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

        public static Attr removeAttribute(String qualifiedName,
                                           Element element)
      • 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(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(String name)

        Retrieves a node specified by name.

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

        @DOMNameAttribute(name="getNamedItemNS")
        public Attr getNamedItemNS(String namespaceURI,
                                                                             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(String name)

        Removes a node specified by name.

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

        @DOMNameAttribute(name="removeNamedItemNS")
        public Attr removeNamedItemNS(String namespaceURI,
                                                                                   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.html.internal.ms.System.Collections.Generic.IGenericEnumerator<Attr> iterator()

        Returns an enumerator that iterates through the collection.

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

        public com.aspose.html.internal.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>
        Parameters:
        observer - The object that is to receive notifications.
        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.html.internal.ms.System.IDisposable