src/java.xml/share/classes/javax/xml/stream/events/StartElement.java
changeset 51046 69634e97740c
parent 47216 71c04702a3d5
equal deleted inserted replaced
51045:215d1a5b097a 51046:69634e97740c
     1 /*
     1 /*
     2  * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2009, 2018, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.  Oracle designates this
     7  * published by the Free Software Foundation.  Oracle designates this
    45    * @return the qualified name of this event
    45    * @return the qualified name of this event
    46    */
    46    */
    47   public QName getName();
    47   public QName getName();
    48 
    48 
    49   /**
    49   /**
    50    * Returns an Iterator of non-namespace declared attributes declared on
    50    * Returns an Iterator of non-namespace attributes declared on this START_ELEMENT.
    51    * this START_ELEMENT,
    51    * Returns an empty iterator if there are no attributes.
    52    * returns an empty iterator if there are no attributes.  The
    52    * The iterator must contain only implementations of the
    53    * iterator must contain only implementations of the javax.xml.stream.Attribute
    53    * {@link Attribute} interface.
    54    * interface.   Attributes are fundamentally unordered and may not be reported
    54    * Attributes are fundamentally unordered and may be reported
    55    * in any order.
    55    * in any order.
    56    *
    56    *
    57    * @return a readonly Iterator over Attribute interfaces, or an
    57    * @return a readonly Iterator over Attribute interfaces, or an
    58    * empty iterator
    58    * empty iterator
    59    */
    59    */
    66    * Therefore this list may contain redeclared namespaces and duplicate namespace
    66    * Therefore this list may contain redeclared namespaces and duplicate namespace
    67    * declarations. Use the getNamespaceContext() method to get the
    67    * declarations. Use the getNamespaceContext() method to get the
    68    * current context of namespace declarations.
    68    * current context of namespace declarations.
    69    *
    69    *
    70    * <p>The iterator must contain only implementations of the
    70    * <p>The iterator must contain only implementations of the
    71    * javax.xml.stream.Namespace interface.
    71    * {@link Namespace} interface.
    72    *
    72    *
    73    * <p>A Namespace isA Attribute.  One
    73    * <p>A {@link Namespace} is an {@link Attribute}.  One
    74    * can iterate over a list of namespaces as a list of attributes.
    74    * can iterate over a list of namespaces as a list of attributes.
    75    * However this method returns only the list of namespaces
    75    * However this method returns only the list of namespaces
    76    * declared on this START_ELEMENT and does not
    76    * declared on this START_ELEMENT and does not
    77    * include the attributes declared on this START_ELEMENT.
    77    * include the attributes declared on this START_ELEMENT.
    78    *
    78    *
    83    *
    83    *
    84    */
    84    */
    85   public Iterator<Namespace> getNamespaces();
    85   public Iterator<Namespace> getNamespaces();
    86 
    86 
    87   /**
    87   /**
    88    * Returns the attribute referred to by this name
    88    * Returns the attribute referred to by the qname.
    89    * @param name the qname of the desired name
    89    * @param name the qname of the desired attribute
    90    * @return the attribute corresponding to the name value or null
    90    * @return the attribute corresponding to the name value or null
    91    */
    91    */
    92   public Attribute getAttributeByName(QName name);
    92   public Attribute getAttributeByName(QName name);
    93 
    93 
    94   /**
    94   /**