/** * This is used to convert the provided node in to an event. The * conversion process ensures the node can be digested by the core * reader and used to provide an <code>InputNode</code> that can * be used to represent the XML elements or attributes. If the * provided node is not an element then it is considered text. * * @param node the node that is to be converted to an event * * @return this returns an event created from the given node */ private EventNode convert(Node node) throws Exception{ short type = node.getNodeType(); if(type == ELEMENT_NODE) { if(node != null) { stack.push(node); } return start(node); } return text(node); }
/** * This is used to convert the provided node in to an event. The * conversion process ensures the node can be digested by the core * reader and used to provide an <code>InputNode</code> that can * be used to represent the XML elements or attributes. If the * provided node is not an element then it is considered text. * * @param node the node that is to be converted to an event * * @return this returns an event created from the given node */ private EventNode convert(Node node) throws Exception{ short type = node.getNodeType(); if(type == ELEMENT_NODE) { if(node != null) { stack.push(node); } return start(node); } return text(node); }
/** * This is used to convert the provided node in to an event. The * conversion process ensures the node can be digested by the core * reader and used to provide an <code>InputNode</code> that can * be used to represent the XML elements or attributes. If the * provided node is not an element then it is considered text. * * @param node the node that is to be converted to an event * * @return this returns an event created from the given node */ private EventNode convert(Node node) throws Exception{ short type = node.getNodeType(); if(type == ELEMENT_NODE) { if(node != null) { stack.push(node); } return start(node); } return text(node); }