System.out.println("Found node: " + node.getNodeType());
	protected void startNode(Node node) throws SAXException {		String cdata;		switch (node.getNodeType()) {			case Node.DOCUMENT_NODE :			case Node.DOCUMENT_FRAGMENT_NODE :				break;			case Node.ELEMENT_NODE :				namespaceDecls.clear();				nsSupport.pushContext();				String uri = node.getNamespaceURI();				String prefix = node.getPrefix();				if (uri == null)					uri = "";				if (prefix == null)					prefix = "";				if (nsSupport.getURI(prefix) == null) {					namespaceDecls.put(prefix, uri);					nsSupport.declarePrefix(prefix, uri);				}				// check attributes for required namespace declarations				NamedNodeMap attrs = node.getAttributes();				Attr nextAttr;				String attrName;				for (int i = 0; i < attrs.getLength(); i++) {					nextAttr = (Attr) attrs.item(i);					attrName = nextAttr.getName();					if (attrName.equals("xmlns")) {						if (nsSupport.getURI("") == null) {							uri = nextAttr.getValue();							namespaceDecls.put("", uri);							nsSupport.declarePrefix("", uri);						}					} else if (attrName.startsWith("xmlns:")) {						prefix = attrName.substring(6);						if (nsSupport.getURI(prefix) == null) {							uri = nextAttr.getValue();							namespaceDecls.put(prefix, uri);							nsSupport.declarePrefix(prefix, uri);						}					} else if (attrName.indexOf(':') > 0) {						prefix = nextAttr.getPrefix();						uri = nextAttr.getNamespaceURI();						if (nsSupport.getURI(prefix) == null) {							namespaceDecls.put(prefix, uri);							nsSupport.declarePrefix(prefix, uri);						}					}				}				ElementInfo info = new ElementInfo(node);				String[] declaredPrefixes = null;				if(namespaceDecls.size() > 0)					declaredPrefixes = new String[namespaceDecls.size()];				// output all namespace declarations				Map.Entry nsEntry;				int j = 0;				for (Iterator i = namespaceDecls.entrySet().iterator(); i.hasNext(); j++) {					nsEntry = (Map.Entry) i.next();					declaredPrefixes[j] = (String) nsEntry.getKey();					contentHandler.startPrefixMapping(						declaredPrefixes[j],						(String) nsEntry.getValue());				}				info.prefixes = declaredPrefixes;                stack.push(info);				// output attributes				AttributesImpl saxAttrs = new AttributesImpl();				String attrNS, attrLocalName;				for (int i = 0; i < attrs.getLength(); i++) {					nextAttr = (Attr) attrs.item(i);					attrNS = nextAttr.getNamespaceURI();					if(attrNS == null)					    attrNS = "";					attrLocalName = nextAttr.getLocalName();					if(attrLocalName == null)					    attrLocalName = QName.extractLocalName(nextAttr.getNodeName());					saxAttrs.addAttribute(						attrNS,						attrLocalName,						nextAttr.getNodeName(),						"CDATA",						nextAttr.getValue());				}				String localName = node.getLocalName();				if(localName == null)				    localName = QName.extractLocalName(node.getNodeName());				contentHandler.startElement(node.getNamespaceURI(), localName, 					node.getNodeName(), saxAttrs);				break;			case Node.TEXT_NODE :			case Node.CDATA_SECTION_NODE :				cdata = ((CharacterData) node).getData();				if(lexicalHandler != null)					lexicalHandler.startCDATA();				contentHandler.characters(cdata.toCharArray(), 0, cdata.length());				if(lexicalHandler != null)					lexicalHandler.endCDATA();				break;			case Node.ATTRIBUTE_NODE :				break;			case Node.PROCESSING_INSTRUCTION_NODE :				contentHandler.processingInstruction(					((ProcessingInstruction) node).getTarget(),					((ProcessingInstruction) node).getData());				break;			case Node.COMMENT_NODE :				if(lexicalHandler != null) {					cdata = ((Comment) node).getData();					lexicalHandler.comment(cdata.toCharArray(), 0, cdata.length());				}				break;			default :				break;		}	}