/** * This is used to convert the start element to an input node. * This will push the created input node on to the stack. The * input node created contains a reference to this reader. so * that it can be used to read child elements and values. * * @param from this is the parent element for the start event * @param event this is the start element to be wrapped * * @return this returns an input node for the given element */ private InputNode readStart(InputNode from, EventNode event) throws Exception { InputElement input = new InputElement(from, this, event); if(text.length() > 0) { text.setLength(0); } if(event.isStart()) { return stack.push(input); } return input; }
/** * This is used to convert the start element to an input node. * This will push the created input node on to the stack. The * input node created contains a reference to this reader. so * that it can be used to read child elements and values. * * @param from this is the parent element for the start event * @param event this is the start element to be wrapped * * @return this returns an input node for the given element */ private InputNode readStart(InputNode from, EventNode event) throws Exception { InputElement input = new InputElement(from, this, event); if(text.length() > 0) { text.setLength(0); } if(event.isStart()) { return stack.push(input); } return input; }
/** * This is used to convert the start element to an input node. * This will push the created input node on to the stack. The * input node created contains a reference to this reader. so * that it can be used to read child elements and values. * * @param from this is the parent element for the start event * @param event this is the start element to be wrapped * * @return this returns an input node for the given element */ private InputNode readStart(InputNode from, EventNode event) throws Exception { InputElement input = new InputElement(from, this, event); if(text.length() > 0) { text.setLength(0); } if(event.isStart()) { return stack.push(input); } return input; }
/** * Returns the next input node from the XML document, if it is a * child element of the specified input node. This essentially * determines whether the end tag has been read for the specified * node, if so then null is returned. If however the specified * node has not had its end tag read then this returns the next * element, if that element is a child of the that node. * * @param from this is the input node to read with * * @return this returns the next input node from the document */ public InputNode readElement(InputNode from) throws Exception { if(!stack.isRelevant(from)) { return null; } EventNode event = reader.next(); while(event != null) { if(event.isEnd()) { if(stack.pop() == from) { return null; } } else if(event.isStart()) { return readStart(from, event); } event = reader.next(); } return null; }
/** * Returns the next input node from the XML document, if it is a * child element of the specified input node. This essentially * determines whether the end tag has been read for the specified * node, if so then null is returned. If however the specified * node has not had its end tag read then this returns the next * element, if that element is a child of the that node. * * @param from this is the input node to read with * * @return this returns the next input node from the document */ public InputNode readElement(InputNode from) throws Exception { if(!stack.isRelevant(from)) { return null; } EventNode event = reader.next(); while(event != null) { if(event.isEnd()) { if(stack.pop() == from) { return null; } } else if(event.isStart()) { return readStart(from, event); } event = reader.next(); } return null; }
/** * Returns the next input node from the XML document, if it is a * child element of the specified input node. This essentially * determines whether the end tag has been read for the specified * node, if so then null is returned. If however the specified * node has not had its end tag read then this returns the next * element, if that element is a child of the that node. * * @param from this is the input node to read with * * @return this returns the next input node from the document */ public InputNode readElement(InputNode from) throws Exception { if(!stack.isRelevant(from)) { return null; } EventNode event = reader.next(); while(event != null) { if(event.isEnd()) { if(stack.pop() == from) { return null; } } else if(event.isStart()) { return readStart(from, event); } event = reader.next(); } return null; }
stack.pop(); } else if(event.isStart()) { if(isName(event, name)) { return readElement(from);
stack.pop(); } else if(event.isStart()) { if(isName(event, name)) { return readElement(from);
stack.pop(); } else if(event.isStart()) { if(isName(event, name)) { return readElement(from);