/** * Returns the list of any direct String nodes of this node. * * @return the list of String values from this node * @since 2.3.0 */ public static List<String> localText(Element self) { List<String> result = new ArrayList<String>(); if (self.getNodeType() == Node.TEXT_NODE || self.getNodeType() == Node.CDATA_SECTION_NODE) { result.add(self.getNodeValue()); } else if (self.hasChildNodes()) { NodeList nodeList = self.getChildNodes(); for (int i = 0; i < nodeList.getLength(); i++) { Node item = nodeList.item(i); if (item.getNodeType() == Node.TEXT_NODE || item.getNodeType() == Node.CDATA_SECTION_NODE) { result.add(item.getNodeValue()); } } } return result; }
/** {@inheritDoc} */ public Object extract(Element element) { return element.getNodeValue(); } }
pOut.println(">"); else if (pNode.getNodeValue() != null) { pOut.print(pNode.getNodeValue()); pOut.print("</"); pOut.print(pNode.getTagName());
annot.getNodeValue() + "]. Annotation ignored", e);
@Override public String toString() { return element.getNodeName() + " " + element.getNodeValue(); }
public static String getElementText(Element element) throws DOMException{ for (Node child = element.getFirstChild(); child != null; child = child.getNextSibling()) { if(child.getNodeType() == Node.TEXT_NODE) return child.getNodeValue(); } return element.getNodeValue(); }
public static String getElementText(Element element) throws DOMException{ for (Node child = element.getFirstChild(); child != null; child = child.getNextSibling()) { if(child.getNodeType() == Node.TEXT_NODE) return child.getNodeValue(); } return element.getNodeValue(); }
public static String getElementText(Element element) throws DOMException{ for (Node child = element.getFirstChild(); child != null; child = child.getNextSibling()) { if(child.getNodeType() == Node.TEXT_NODE) return child.getNodeValue(); } return element.getNodeValue(); }
public static String getElementText(Element element) throws DOMException{ for (Node child = element.getFirstChild(); child != null; child = child.getNextSibling()) { if(child.getNodeType() == Node.TEXT_NODE) return child.getNodeValue(); } return element.getNodeValue(); }
InputStream origin = new FileInputStream(url); DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder(); Document doc = builder.parse(origin); //Obtain to tag element Element toTag = originalDoc.getElementsByTagName("to").item(0); //Obtain Tove value String value = toTag.getNodeValue();
public static String getElementText(Element element) throws DOMException{ for (Node child = element.getFirstChild(); child != null; child = child.getNextSibling()) { if(child.getNodeType() == Node.TEXT_NODE) return child.getNodeValue(); } return element.getNodeValue(); }
protected static String getElementValue(Element element) { String s = element.getNodeValue(); if (s != null) return s; NodeList nodelist = element.getChildNodes(); for (int i = 0; i < nodelist.getLength(); i++) if (nodelist.item(i) instanceof Text) return ((Text) nodelist.item(i)).getData(); return null; }
/** * @see org.w3c.dom.Node#getNodeValue() */ public String getNodeValue() throws DOMException { return getCurrentInternal().getNodeValue(); }
/** * @see org.w3c.dom.Node#getNodeValue() */ @Override public String getNodeValue() { return original.get().getNodeValue(); }
/** * @see org.w3c.dom.Node#getNodeValue() */ @Override public String getNodeValue() { return original.get().getNodeValue(); }
@Override public String getNodeValue() throws DOMException { final Element elem = getElement(); return elem != null ? elem.getNodeValue() : null; }
/** * @see org.w3c.dom.Node#getNodeValue() */ public String getNodeValue() throws DOMException { return getAtualInterno().getNodeValue(); }
public void readSchema(org.w3c.dom.Element node) { String myName = node.getLocalName(); String myValue = node.getNodeValue(); AnyNode el = new AnyNode(myName, myValue); // Should read in attributes too. //System.out.println("Just read AnyNode: myName="+myName+" myValue="+myValue); pushCurrent(el); read(node); popCurrent(); }
protected void visit(Operation operation) { opInfo = getServiceInfo(portType).addOperation(operation.getName(), null); Element docElem = operation.getDocumentationElement(); if (docElem != null) { String docText = docElem.getNodeValue();// TextContent(); opInfo.setDocumenation(docText); } wop2op.put(operation, opInfo); }
protected void visit(Fault fault) { FaultInfo faultInfo = opInfo.addFault(fault.getName()); faultInfo.setMessageName(fault.getMessage().getQName()); if(fault.getDocumentationElement()!= null ){ faultInfo.setDocumentation(fault.getDocumentationElement().getNodeValue());//TextContent()); } wfault2msg.put(fault, faultInfo); createMessageParts(faultInfo, fault.getMessage()); }