@Override public org.w3c.dom.Node getLastChild() { return node.getLastChild(); }
/** * @see org.w3c.dom.Node#getLastChild() */ public Node getLastChild() { return m_attributeNode.getLastChild(); }
@Override public void characters(char[] ch, int start, int length) { String data = new String(ch, start, length); Node parent = getParent(); Node lastChild = parent.getLastChild(); if (lastChild != null && lastChild.getNodeType() == Node.TEXT_NODE) { ((Text) lastChild).appendData(data); } else { Text text = this.document.createTextNode(data); parent.appendChild(text); } }
@Override public void characters(char[] ch, int start, int length) { String data = new String(ch, start, length); Node parent = getParent(); Node lastChild = parent.getLastChild(); if (lastChild != null && lastChild.getNodeType() == Node.TEXT_NODE) { ((Text) lastChild).appendData(data); } else { Text text = this.document.createTextNode(data); parent.appendChild(text); } }
protected Text characters(String s) { Node parent = nodeStack.peek(); Node lastChild = parent.getLastChild(); Text text; if (isConsolidate && lastChild != null && lastChild.getNodeType() == Node.TEXT_NODE) { text = (Text) lastChild; text.appendData(s); } else { text = document.createTextNode(s); parent.appendChild(text); } return text; }
public XmlNode updateXML(Object jaxbObject, XmlNode xmlNode) throws JAXBException { if(jaxbObject==null || xmlNode==null) throw new IllegalArgumentException(); // TODO // for now just marshal // TODO: object model independenc Element e = (Element)xmlNode; Node ns = e.getNextSibling(); Node p = e.getParentNode(); p.removeChild(e); // if the type object is passed, the following step is necessary to make // the marshalling successful. JaxBeanInfo bi = context.getBeanInfo(jaxbObject, true); if(!bi.isElement()) jaxbObject = new JAXBElement(new QName(e.getNamespaceURI(),e.getLocalName()),bi.jaxbType,jaxbObject); getMarshaller().marshal(jaxbObject,p); Node newNode = p.getLastChild(); p.removeChild(newNode); p.insertBefore(newNode,ns); return (XmlNode)newNode; }
/** * @param token the XML pull parser token type, such as XmlPullParser.CDSECT * or XmlPullParser.ENTITY_REF. */ private void appendText(DocumentImpl document, Node parent, int token, String text) { // Ignore empty runs. if (text.isEmpty()) { return; } // Merge with any previous text node if possible. if (coalescing || token != XmlPullParser.CDSECT) { Node lastChild = parent.getLastChild(); if (lastChild != null && lastChild.getNodeType() == Node.TEXT_NODE) { Text textNode = (Text) lastChild; textNode.appendData(text); return; } } // Okay, we really do need a new text node parent.appendChild(token == XmlPullParser.CDSECT ? new CDATASectionImpl(document, text) : new TextImpl(document, text)); }
CDATASection section =(CDATASection) m_currentNode.getLastChild(); section.appendData(s);
CDATASection section =(CDATASection) m_currentNode.getLastChild(); section.appendData(s);
childNode = m_currentNode != null ? m_currentNode.getLastChild(): null; if( childNode != null && childNode.getNodeType() == Node.TEXT_NODE ){ ((Text)childNode).appendData(s);
childNode = m_currentNode != null ? m_currentNode.getLastChild(): null; if( childNode != null && childNode.getNodeType() == Node.TEXT_NODE ){ ((Text)childNode).appendData(s);
protected Text characters(String s) { Node parent = nodeStack.peek(); Node lastChild = parent.getLastChild(); Text text; if (isConsolidate && lastChild != null && lastChild.getNodeType() == Node.TEXT_NODE) { text = (Text) lastChild; text.appendData(s); } else { text = document.createTextNode(s); parent.appendChild(text); } return text; }
public void characters(char ch[], int start, int length) throws SAXException { String data = new String(ch, start, length); Node parent = getParent(); Node lastChild = parent.getLastChild(); if (lastChild != null && lastChild.getNodeType() == Node.TEXT_NODE) { ((Text) lastChild).appendData(data); } else { Text text = document.createTextNode(data); parent.appendChild(text); } }
public XmlNode updateXML(Object jaxbObject, XmlNode xmlNode) throws JAXBException { if(jaxbObject==null || xmlNode==null) throw new IllegalArgumentException(); // TODO // for now just marshal // TODO: object model independenc Element e = (Element)xmlNode; Node ns = e.getNextSibling(); Node p = e.getParentNode(); p.removeChild(e); // if the type object is passed, the following step is necessary to make // the marshalling successful. JaxBeanInfo bi = context.getBeanInfo(jaxbObject, true); if(!bi.isElement()) jaxbObject = new JAXBElement(new QName(e.getNamespaceURI(),e.getLocalName()),bi.jaxbType,jaxbObject); getMarshaller().marshal(jaxbObject,p); Node newNode = p.getLastChild(); p.removeChild(newNode); p.insertBefore(newNode,ns); return (XmlNode)newNode; }
jfifThumb.appendChild(thumbTree.getLastChild()); app0JFXX.appendChild(jfifThumb); break;
/** * @see org.w3c.dom.Node#getLastChild() */ public Node getLastChild() { return m_attributeNode.getLastChild(); }
/** * @see org.w3c.dom.Node#getLastChild() */ public Node getLastChild() { return m_attributeNode.getLastChild(); }
public boolean isLastChildElement(Object element) { org.w3c.dom.Node parent = ((org.w3c.dom.Element) element).getParentNode(); Node currentChild = parent.getLastChild(); while (currentChild != null && currentChild.getNodeType() != Node.ELEMENT_NODE) { currentChild = currentChild.getPreviousSibling(); } return currentChild == element; }
/** * {@inheritDoc} */ @Override public void selectNodeContents(final Node node) throws RangeException, DOMException { startContainer_ = node.getFirstChild(); startOffset_ = 0; endContainer_ = node.getLastChild(); endOffset_ = getMaxOffset(node.getLastChild()); }
public void characters(char ch[], int start, int length) throws SAXException { String data = new String(ch, start, length); Node parent = getParent(); Node lastChild = parent.getLastChild(); if (lastChild != null && lastChild.getNodeType() == Node.TEXT_NODE) { ((Text) lastChild).appendData(data); } else { Text text = document.createTextNode(data); parent.appendChild(text); } }