Examples of writeCData()


Examples of javax.xml.stream.XMLStreamWriter.writeCData()

         String filename = row.getIndex().getName();
         MavenReportUtils.tableRow(sink, new String[]{ text, filename});
         //xml.append( "<entry file='").append(filename).append("'>").append(text ). append("</entry>\n");
         xml.writeStartElement("entry");
         xml.writeAttribute("file", filename);
         xml.writeCData(text);
         xml.writeEndElement();
       }
      
       MavenReportUtils.endTable(sink);
       //xml.append( "</report>\n");
View Full Code Here

Examples of javax.xml.stream.XMLStreamWriter.writeCData()

        XMLStreamWriter writer = omOutput.getXmlStreamWriter();
        int type = getType();
        if (type == TEXT_NODE) {
            writer.writeCharacters(this.value);
        } else if (type == CDATA_SECTION_NODE) {
            writer.writeCData(this.value);
        }
        OMNode nextSibling = this.getNextSibling();
        if (nextSibling != null) {
            nextSibling.serializeWithCache(omOutput);
        }
View Full Code Here

Examples of javax.xml.stream.XMLStreamWriter.writeCData()

    {
        final XMLStreamWriter writer = this.writer;
        try
        {
            writer.writeStartElement(schema.getFieldName(fieldNumber));
            writer.writeCData(STRING.deser(value));
            writer.writeEndElement();
        }
        catch (XMLStreamException e)
        {
            throw new XmlOutputException(e);
View Full Code Here

Examples of javax.xml.stream.XMLStreamWriter.writeCData()

        final XMLStreamWriter writer = this.writer;
        try
        {
            writer.writeStartElement(schema.getFieldName(fieldNumber));
            writer.writeCData(STRING.deser(value, offset, length));
            writer.writeEndElement();
        }
        catch (XMLStreamException e)
        {
            throw new XmlOutputException(e);
View Full Code Here

Examples of javax.xml.stream.XMLStreamWriter.writeCData()

  public void testEscapeCData() throws Exception {
    StringWriter result = new StringWriter();
    XMLStreamWriter writer = new SimpleXMLStreamWriter(result, false);
    writer.writeStartDocument();
    writer.writeStartElement("alice");
    writer.writeCData("<>&\"'");
    writer.writeEndElement();
    writer.writeEndDocument();
    writer.close();
    Assert.assertEquals("<?xml version=\"1.0\" encoding=\"UTF-8\"?><alice><![CDATA[<>&\"']]></alice>", result.toString());
  }
View Full Code Here

Examples of javax.xml.stream.XMLStreamWriter.writeCData()

  @Test
  public void testWriteCDtata() throws XMLStreamException {
    XMLStreamWriter writer = createXMLStreamWriter(false);
    writer.writeStartElement("foo");
    writer.writeCData("bar");
    writer.writeEndElement();
    writer.flush();
    Assert.assertEquals("<foo><![CDATA[bar]]></foo>", writer.toString());
  }
View Full Code Here

Examples of javax.xml.stream.XMLStreamWriter.writeCData()

  @Test
  public void testWriteCDtata2() throws XMLStreamException {
    XMLStreamWriter writer = createXMLStreamWriter(false);
    writer.writeStartElement("foo");
    writer.writeCData("<>'\"&");
    writer.writeEndElement();
    writer.flush();
    Assert.assertEquals("<foo><![CDATA[<>'\"&]]></foo>", writer.toString());
  }
View Full Code Here

Examples of javax.xml.stream.XMLStreamWriter.writeCData()

                        writer.writeAttribute("Name", key);
                        writer.writeEndElement();
                    } else {
                        writer.writeStartElement("Header");
                        writer.writeAttribute("Name", key);
                        writer.writeCData(Headers.get(key));
                        writer.writeEndElement();
                    }
                }
            }
            writer.writeEndElement();
View Full Code Here

Examples of org.apache.xml.security.stax.impl.XMLSecurityStreamWriter.writeCData()

        stdXmlStreamWriter.writeEmptyElement("t3", "test3", "test3ns");

        xmlSecurityStreamWriter.writeCharacters("\n");
        stdXmlStreamWriter.writeCharacters("\n");

        xmlSecurityStreamWriter.writeCData("Hi");
        stdXmlStreamWriter.writeCData("Hi");

        xmlSecurityStreamWriter.writeComment("this is a comment");
        stdXmlStreamWriter.writeComment("this is a comment");
View Full Code Here

Examples of org.apache.xml.security.stax.impl.XMLSecurityStreamWriter.writeCData()

        stdXmlStreamWriter.writeEmptyElement("t3", "test3", "test3ns");

        xmlSecurityStreamWriter.writeCharacters("\n");
        stdXmlStreamWriter.writeCharacters("\n");

        xmlSecurityStreamWriter.writeCData("Hi");
        stdXmlStreamWriter.writeCData("Hi");

        xmlSecurityStreamWriter.writeComment("this is a comment");
        stdXmlStreamWriter.writeComment("this is a comment");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.