Examples of writeProcessingInstruction()


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

        xmlSecurityStreamWriter.writeEndElement();
        stdXmlStreamWriter.writeEndElement();

        xmlSecurityStreamWriter.writeProcessingInstruction("PI");
        stdXmlStreamWriter.writeProcessingInstruction("PI");

        xmlSecurityStreamWriter.writeProcessingInstruction("PI", "there");
        stdXmlStreamWriter.writeProcessingInstruction("PI", "there");

        Assert.assertEquals(xmlSecurityStreamWriter.getPrefix("test4ns"), stdXmlStreamWriter.getPrefix("test4ns"));
View Full Code Here

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

        xmlSecurityStreamWriter.writeProcessingInstruction("PI");
        stdXmlStreamWriter.writeProcessingInstruction("PI");

        xmlSecurityStreamWriter.writeProcessingInstruction("PI", "there");
        stdXmlStreamWriter.writeProcessingInstruction("PI", "there");

        Assert.assertEquals(xmlSecurityStreamWriter.getPrefix("test4ns"), stdXmlStreamWriter.getPrefix("test4ns"));

        stdXmlStreamWriter.close();
        xmlSecurityStreamWriter.close();
View Full Code Here

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

     * @throws XMLStreamException
     * @see #serialize(org.apache.ws.commons.om.impl.OMOutputImpl)
     */
    public void serialize(org.apache.ws.commons.om.impl.OMOutputImpl omOutput) throws XMLStreamException {
        XMLStreamWriter writer = omOutput.getXmlStreamWriter();
        writer.writeProcessingInstruction(this.target+" ", this.value);
    }

    /**
     * Serializes the node without caching.
     *
 
View Full Code Here

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

     * @throws XMLStreamException
     * @see #serializeWithCache(org.apache.axis2.om.impl.OMOutputImpl)
     */
    public void serializeWithCache(org.apache.axis2.om.impl.OMOutputImpl omOutput) throws XMLStreamException {
        XMLStreamWriter writer = omOutput.getXmlStreamWriter();
        writer.writeProcessingInstruction(this.target+" ", this.value);
        OMNode nextSibling = this.getNextSibling();
        if (nextSibling != null) {
            nextSibling.serializeWithCache(omOutput);
        }
    }
View Full Code Here

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

  @Test
  public void testRootArray() throws Exception {
    StringWriter result = new StringWriter();
    XMLStreamWriter writer = createXmlStreamWriter(result, new QName("alice"));
    writer.writeStartDocument();
    writer.writeProcessingInstruction(JsonXMLStreamConstants.MULTIPLE_PI_TARGET);
    writer.writeStartElement("alice");
    writer.writeCharacters("bob");
    writer.writeEndElement();
    writer.writeStartElement("alice");
    writer.writeCharacters("bob");
View Full Code Here

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

  @Test
  public void testDocumentArray() throws Exception {
    StringWriter result = new StringWriter();
    XMLStreamWriter writer = createXmlStreamWriter(result, new QName("alice"));
    writer.writeProcessingInstruction(JsonXMLStreamConstants.MULTIPLE_PI_TARGET);
    writer.writeStartDocument();
    writer.writeStartElement("alice");
    writer.writeCharacters("bob");
    writer.writeEndElement();
    writer.writeEndDocument();
View Full Code Here

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

      Marshaller marshaller = context.createMarshaller();
      if (!writeDocumentArray) {
        writer.writeStartDocument();
        marshaller.setProperty(Marshaller.JAXB_FRAGMENT, true);
      }
      writer.writeProcessingInstruction(JsonXMLStreamConstants.MULTIPLE_PI_TARGET);
      for (Object value : collection) {
        if (value == null) { // hack: write null
          writer.writeCharacters(null);
        } else {             
          marshal(type, config, marshaller, writer, value);
View Full Code Here

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

  public void testArray() throws Exception {
    StringWriter result = new StringWriter();
    XMLStreamWriter writer = new JsonXMLOutputFactory().createXMLStreamWriter(result);
    writer.writeStartDocument();
    writer.writeStartElement("alice");
    writer.writeProcessingInstruction(JsonXMLStreamConstants.MULTIPLE_PI_TARGET, "bob");
    writer.writeStartElement("bob");
    writer.writeCharacters("charlie");
    writer.writeEndElement();
    writer.writeStartElement("bob");
    writer.writeCharacters("david");
View Full Code Here

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

  public void testArray2() throws Exception {
    StringWriter result = new StringWriter();
    XMLStreamWriter writer = new JsonXMLOutputFactory().createXMLStreamWriter(result);
    writer.writeStartDocument();
    writer.writeStartElement("alice");
    writer.writeProcessingInstruction(JsonXMLStreamConstants.MULTIPLE_PI_TARGET);
    writer.writeStartElement("bob");
    writer.writeCharacters("charlie");
    writer.writeEndElement();
    writer.writeStartElement("bob");
    writer.writeCharacters("david");
View Full Code Here

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

  public void testArray3() throws Exception {
    StringWriter result = new StringWriter();
    XMLStreamWriter writer = new JsonXMLOutputFactory().createXMLStreamWriter(result);
    writer.writeStartDocument();
    writer.writeStartElement("alice");
    writer.writeProcessingInstruction(JsonXMLStreamConstants.MULTIPLE_PI_TARGET, "bob");
    writer.writeEndElement();
    writer.writeEndDocument();
    writer.close();
    Assert.assertEquals("{\"alice\":{\"bob\":[]}}", result.toString());
  }
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.