String nodeValue = node.getNodeValue(); int endIndex = nodeValue.indexOf("]]>"); if ((fFeatures & SPLITCDATA) != 0) {
String nodeValue = node.getNodeValue(); int endIndex = nodeValue.indexOf("]]>"); if ((fFeatures & SPLITCDATA) != 0) {
protected void visitCDATASection(CDATASection cdata) throws XMLStreamException { out.writeCData(cdata.getNodeValue()); }
protected void visitCDATASection(CDATASection cdata) throws XMLStreamException { out.writeCData(cdata.getNodeValue()); }
protected void visitCDATASection(CDATASection cdata) throws XMLStreamException { out.writeCData(cdata.getNodeValue()); }
protected void write(CDATASection node) { printWriter.print("<![CDATA["); //$NON-NLS-1$ printWriter.print(node.getNodeValue()); printWriter.print("]]>"); //$NON-NLS-1$ printWriter.flush(); }
protected void write(CDATASection node) { printWriter.print("<![CDATA["); //$NON-NLS-1$ printWriter.print(node.getNodeValue()); printWriter.print("]]>"); //$NON-NLS-1$ printWriter.flush(); }
protected void write(CDATASection node) { printWriter.print("<![CDATA["); //$NON-NLS-1$ printWriter.print(node.getNodeValue()); printWriter.print("]]>"); //$NON-NLS-1$ printWriter.flush(); }
private void dumpCDATASection(final CDATASection cdataSection) throws IOException { nonNullArgument(cdataSection, "cdataSection"); writer.write("<![CDATA["); writer.write(cdataSection.getNodeValue()); writer.write("]]>"); }
public void cdata(CDATASection node) throws XNIException { /** Create new CDATASection node for the target. */ append(fDocument.createCDATASection(node.getNodeValue())); }
public void cdata(CDATASection node) throws XNIException { /** Create new CDATASection node for the target. */ append(fDocument.createCDATASection(node.getNodeValue())); }
public void cdata(CDATASection node) throws XNIException { /** Create new CDATASection node for the target. */ append(fDocument.createCDATASection(node.getNodeValue())); }
protected void write(CDATASection node) { printWriter.print("<![CDATA["); //$NON-NLS-1$ String data = node.getNodeValue(); // XML parsers normalize line endings to '\n'. We should write // it out as it was in the original to avoid whitespace commits // on some version control systems int len = (data != null) ? data.length() : 0; for (int i = 0; i < len; i++) { char c = data.charAt(i); if (c == '\n') { printWriter.print(System.getProperty("line.separator")); //$NON-NLS-1$ } else { printWriter.print(c); } } printWriter.print("]]>"); //$NON-NLS-1$ printWriter.flush(); }
child = (CDATASection) parent.getLastChild(); removed = (CDATASection) parent.removeChild(child); removedValue = removed.getNodeValue(); assertEquals("noderemovechild18", "This is an adjacent CDATASection with a reference to a tab &tab;", removedValue);
/** * Runs the test case. * @throws Throwable Any uncaught exception causes test to fail */ public void runTest() throws Throwable { Document doc; CDATASection newCDATASectionNode; String newCDATASectionValue; String newCDATASectionName; int newCDATASectionType; doc = (Document) load("staff", true); newCDATASectionNode = doc.createCDATASection("This is a new CDATASection node"); newCDATASectionValue = newCDATASectionNode.getNodeValue(); assertEquals("nodeValue", "This is a new CDATASection node", newCDATASectionValue); newCDATASectionName = newCDATASectionNode.getNodeName(); assertEquals("nodeName", "#cdata-section", newCDATASectionName); newCDATASectionType = (int) newCDATASectionNode.getNodeType(); assertEquals("nodeType", 4, newCDATASectionType); } /**
/** * Runs the test case. * @throws Throwable Any uncaught exception causes test to fail */ public void runTest() throws Throwable { Document doc; DocumentFragment docFrag; EntityReference entRef; CDATASection cdata; CDATASection replacedCData; EntityReference replacedEref; String cdataName; String erefName; Node appendedChild; doc = (Document) load("hc_staff", true); docFrag = doc.createDocumentFragment(); cdata = doc.createCDATASection("CDATASection"); entRef = doc.createEntityReference("alpha"); appendedChild = docFrag.appendChild(entRef); appendedChild = docFrag.appendChild(cdata); replacedCData = (CDATASection) docFrag.replaceChild(entRef, cdata); cdataName = replacedCData.getNodeValue(); assertEquals("nodereplacechild18_1", "CDATASection", cdataName); replacedEref = (EntityReference) docFrag.replaceChild(cdata, entRef); erefName = replacedEref.getNodeName(); assertEquals("nodereplacechild18_2", "alpha", erefName); } /**
CDATASection cdata = (CDATASection) node; out.cdata( cdata.getNodeValue(), true); break;
String nodeValue = node.getNodeValue(); int endIndex = nodeValue.indexOf("]]>"); if ((fFeatures & SPLITCDATA) != 0) {
CDATASection cdata = (CDATASection) node; out.cdata( cdata.getNodeValue(), true); break;
CDATASection cdata = (CDATASection) node; out.cdata( cdata.getNodeValue(), true); break;