List of usage examples for com.google.gwt.xml.client Node CDATA_SECTION_NODE
short CDATA_SECTION_NODE
To view the source code for com.google.gwt.xml.client Node CDATA_SECTION_NODE.
Click Source Link
From source file:client.net.sf.saxon.ce.xmldom.NodeXml.java
License:Apache License
/** * This method creates a new node of the correct type. * /*from w w w . j av a 2 s . c o m*/ * @param node - the supplied DOM JavaScript object * @return a Node object that corresponds to the DOM object */ public static Node build(JavaScriptObject node) { if (node == null) { return null; } short nodeType = XMLParserImpl.getNodeType(node); switch (nodeType) { case Node.ATTRIBUTE_NODE: return new AttrImpl(node); case Node.CDATA_SECTION_NODE: return new CDATASectionImpl(node); case Node.COMMENT_NODE: return new CommentImpl(node); case Node.DOCUMENT_FRAGMENT_NODE: return new DocumentFragmentImpl(node); case Node.DOCUMENT_NODE: return new DocumentImpl(node); case Node.ELEMENT_NODE: return new ElementImpl(node); case Node.PROCESSING_INSTRUCTION_NODE: return new ProcessingInstructionImpl(node); case Node.TEXT_NODE: return new TextImpl(node); default: return new NodeXml(node); } }
From source file:com.lorepo.icf.utils.XMLUtils.java
License:Open Source License
/** * get CDATA node text/*from w w w.j a va2 s.c o m*/ * @return contents of tag */ public static String getCDATA(Element element) { String text = new String(); NodeList nodes = element.getChildNodes(); for (int i = 0; i < nodes.getLength(); i++) { Node node = nodes.item(i); if (node.getNodeType() == Node.CDATA_SECTION_NODE) { text = text + node.getNodeValue(); } } return text; }
From source file:org.gk.engine.client.build.panel.XHtmlPanel.java
License:Open Source License
public XHtmlPanel(Node node) { super(node, null); Node firstNode = node.getFirstChild(); if (firstNode != null && firstNode.getNodeType() == Node.CDATA_SECTION_NODE) { content = firstNode.getNodeValue(); } else {/* w w w . java2s . c o m*/ content = node.getChildNodes() + ""; } if (content == null || content.equals("null")) { content = ""; } }
From source file:org.openxdata.sharedlib.client.xforms.XmlUtil.java
public static Node getChildCDATA(Node node) { NodeList nodes = node.getChildNodes(); for (int index = 0; index < nodes.getLength(); index++) { Node child = nodes.item(index); if (child.getNodeType() == Node.CDATA_SECTION_NODE) return child; }// ww w .j a va2 s.co m return node; }
From source file:sf.wicklet.gwt.client.util.GwtXmlUtil.java
License:Apache License
public static void getTextUnder(final StringBuilder b, final Node e) { if (e != null) { for (Node n = e.getFirstChild(); n != null; n = n.getNextSibling()) { final short type = n.getNodeType(); if (type == Node.CDATA_SECTION_NODE || type == Node.TEXT_NODE) { b.append(n.getNodeValue()); } else if (type == Node.ELEMENT_NODE) { getTextUnder(b, n);/*from w ww .j a v a 2s . co m*/ } } } }