Java XML Attribute Namespace isNoNamespaceAttribute(final XMLStreamReader reader, final int index)

Here you can find the source of isNoNamespaceAttribute(final XMLStreamReader reader, final int index)

Description

is No Namespace Attribute

License

Apache License

Declaration

public static boolean isNoNamespaceAttribute(final XMLStreamReader reader, final int index) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import javax.xml.XMLConstants;

import javax.xml.stream.XMLStreamReader;

public class Main {
    public static boolean isNoNamespaceAttribute(final XMLStreamReader reader, final int index) {
        String namespace = reader.getAttributeNamespace(index);
        // FIXME when STXM-8 is done, remove the null check
        return namespace == null || XMLConstants.NULL_NS_URI.equals(namespace);
    }/*w  w w. ja  v a 2 s . co  m*/
}

Related

  1. countNonNamespaceAttribures(NamedNodeMap attrs)
  2. getNamespaceDeclarationPrefix(Attr attr)
  3. isNamespaceDef(Attr attr)
  4. isNamespaceDefinition(Attr attr)
  5. searchParentNamespaces(Node xml, String attribute)