Code example for Node

Methods: getNodeTypegetOwnerDocument

0
	// } 
	// return value; 
	// } 
 
	public NamespaceInfos getNamespaceInfo(Node node) {
		if (node.getNodeType() == Node.DOCUMENT_NODE) {
			return getNamespaceInfo((IDOMDocument) node);
		} 
		return getNamespaceInfo((IDOMDocument) node.getOwnerDocument());
	} 
 
	public NamespaceInfos getNamespaceInfo(IDOMDocument document) {
		String modelID = document.getModel().getId();
		Map<String, NamespaceInfos> namespaceInfo = getNamespaceInfo();
		NamespaceInfos info = namespaceInfo.get(modelID);
 
		if (info == null) {
			if (document.getDocumentElement() != null) {
				info = new NamespaceInfos();
				NamespaceTable namespaceTable = new NamespaceTable(document);
				namespaceTable.visitElement(document.getDocumentElement());