/** * This is used to read the next node from the document. This will * scan through the document, ignoring any comments to find the * next relevant XML event to acquire. Typically events will be * the start and end of an element, as well as any text nodes. * * @param node this is the XML node that has been read * * @return this returns the next event taken from the document */ private EventNode read(Node node) throws Exception { Node parent = node.getParentNode(); Node top = stack.top(); if(parent != top) { if(top != null) { stack.pop(); } return end(); } if(node != null) { queue.poll(); } return convert(node); }
/** * This is used to read the next node from the document. This will * scan through the document, ignoring any comments to find the * next relevant XML event to acquire. Typically events will be * the start and end of an element, as well as any text nodes. * * @param node this is the XML node that has been read * * @return this returns the next event taken from the document */ private EventNode read(Node node) throws Exception { Node parent = node.getParentNode(); Node top = stack.top(); if(parent != top) { if(top != null) { stack.pop(); } return end(); } if(node != null) { queue.poll(); } return convert(node); }
/** * This is used to read the next node from the document. This will * scan through the document, ignoring any comments to find the * next relevant XML event to acquire. Typically events will be * the start and end of an element, as well as any text nodes. * * @param node this is the XML node that has been read * * @return this returns the next event taken from the document */ private EventNode read(Node node) throws Exception { Node parent = node.getParentNode(); Node top = stack.top(); if(parent != top) { if(top != null) { stack.pop(); } return end(); } if(node != null) { queue.poll(); } return convert(node); }