Here you can find the source of getNamespaceUri(Node node)
Parameter | Description |
---|---|
node | The node to get the namespace URI of. |
public static String getNamespaceUri(Node node)
//package com.java2s; // Licensed under the Apache License, Version 2.0 (the "License"); import org.w3c.dom.Node; import javax.xml.XMLConstants; public class Main { /**//from www .ja va 2 s . c o m * Get the namespace URI of a given node. * * @param node The node to get the namespace URI of. * @return The namespace URI, or the null namespace URI if the node has none. */ public static String getNamespaceUri(Node node) { String namespace = node.getNamespaceURI(); return (namespace != null) ? namespace : XMLConstants.NULL_NS_URI; } }