Examples of writeCData()


Examples of com.mucommander.xml.XmlWriter.writeCData()

            out.println();

            // Writes the content of the shell history.
            while(history.hasNext()) {
                out.startElement(COMMAND_ELEMENT);
                out.writeCData(history.next());
                out.endElement(COMMAND_ELEMENT);
            }
            out.endElement(ROOT_ELEMENT);
        }
        catch(Exception e) {
View Full Code Here

Examples of com.mucommander.xml.XmlWriter.writeCData()

            out.startElement(ELEMENT_CREDENTIALS);
            out.println();

            // Write URL
            out.startElement(ELEMENT_URL);
            out.writeCData(realm.toString(false));
            out.endElement(ELEMENT_URL);

            Credentials credentials = credentialsMapping.getCredentials();

            // Write login
View Full Code Here

Examples of com.mucommander.xml.XmlWriter.writeCData()

            Credentials credentials = credentialsMapping.getCredentials();

            // Write login
            out.startElement(ELEMENT_LOGIN);
            out.writeCData(credentials.getLogin());
            out.endElement(ELEMENT_LOGIN);

            // Write password (XOR encrypted)
            out.startElement(ELEMENT_PASSWORD);
            out.writeCData(XORCipher.encryptXORBase64(credentials.getPassword()));
View Full Code Here

Examples of com.mucommander.xml.XmlWriter.writeCData()

            out.writeCData(credentials.getLogin());
            out.endElement(ELEMENT_LOGIN);

            // Write password (XOR encrypted)
            out.startElement(ELEMENT_PASSWORD);
            out.writeCData(XORCipher.encryptXORBase64(credentials.getPassword()));
            out.endElement(ELEMENT_PASSWORD);

            // Write properties, each property is stored in a separate 'property' element
            propertyKeys = realm.getPropertyNames();
            while(propertyKeys.hasMoreElements()) {
View Full Code Here

Examples of de.odysseus.staxon.xml.SimpleXMLStreamWriter.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()

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

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

        xmlSecurityStreamWriter.writeComment("this is a comment");
        stdXmlStreamWriter.writeComment("this is a comment");

        xmlSecurityStreamWriter.writeCharacters("abcdcba".toCharArray(), 3, 1);
View Full Code Here

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

        writer.writeStartElement("error");
        StringWriter sw = new StringWriter();
        PrintWriter pw = new PrintWriter(sw);
        error.printStackTrace(pw);
        pw.close();
        writer.writeCData(sw.toString());
        writer.writeEndElement();
        writer.writeEndDocument();
    }

    public void sendAccepted(MessageExchange exchange, HttpServletRequest request, HttpServletResponse response)
View Full Code Here

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

                xsw.writeStartElement("stack-trace");
                StringWriter sw2 = new StringWriter();
                PrintWriter pw = new PrintWriter(sw2);
                msg.getException().printStackTrace(pw);
                pw.close();
                xsw.writeCData(sw2.toString());
                xsw.writeEndElement();
                xsw.writeCharacters("\n\t\t\t\t");
                xsw.writeEndElement();
                xsw.writeCharacters("\n\t\t\t");
                xsw.writeEndElement();
View Full Code Here

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

                switch (event) {
                case XMLStreamConstants.ATTRIBUTE:
                    break;
                case XMLStreamConstants.CDATA:
                    wrt.writeCData(rdr.getText());
                    break;
                case XMLStreamConstants.CHARACTERS:
                    wrt.writeCharacters(rdr.getText());
                    break;
                case XMLStreamConstants.COMMENT:
View Full Code Here

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

            } else if (event == XMLStreamReader.CHARACTERS) {
                writer.writeCharacters(parser.getText());
            } else if (event == XMLStreamReader.COMMENT) {
                writer.writeComment(parser.getText());
            } else if (event == XMLStreamReader.CDATA) {
                writer.writeCData(parser.getText());
            } else if (event == XMLStreamReader.END_ELEMENT) {
                level--;
                if (level == 0) {
                    break;
                }
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.