Code example for Node

Methods: getNodeType

0
		if (node == null) {
			return null; 
		} 
 
		NodeProxy proxy;
		switch (node.getNodeType()) {
			case Node.ATTRIBUTE_NODE:
				proxy = new AttrProxy((Attr)node);
				break; 
			case Node.CDATA_SECTION_NODE:
				proxy = new CDATASectionProxy((CDATASection)node);
				break; 
			case Node.COMMENT_NODE:
				proxy = new CommentProxy((Comment)node);
				break; 
			case Node.DOCUMENT_FRAGMENT_NODE:
				proxy = new DocumentFragmentProxy((DocumentFragment)node);
				break; 
			case Node.DOCUMENT_NODE:
				proxy = new DocumentProxy((Document)node);
				break;