Examples of createXMLStreamWriter()


Examples of javax.xml.stream.XMLOutputFactory.createXMLStreamWriter()

            // Get users
            Set<String> users = directory.getIdentifiers();

            XMLOutputFactory outputFactory = XMLOutputFactory.newInstance();
            XMLStreamWriter xml = outputFactory.createXMLStreamWriter(response.getWriter());

            // Begin document
            xml.writeStartDocument();
            xml.writeStartElement("users");
View Full Code Here

Examples of javax.xml.stream.XMLOutputFactory.createXMLStreamWriter()

            // Get self
            User self = context.self();

            XMLOutputFactory outputFactory = XMLOutputFactory.newInstance();
            XMLStreamWriter xml = outputFactory.createXMLStreamWriter(response.getWriter());

            // Write content of root group
            xml.writeStartDocument();
            writeConnectionGroup(self, xml, root);
            xml.writeEndDocument();
View Full Code Here

Examples of javax.xml.stream.XMLOutputFactory.createXMLStreamWriter()

            // Get self
            User self = context.self();

            XMLOutputFactory outputFactory = XMLOutputFactory.newInstance();
            XMLStreamWriter xml = outputFactory.createXMLStreamWriter(response.getWriter());

            // Write content of root group
            xml.writeStartDocument();
            writeConnectionGroup(self, xml, root);
            xml.writeEndDocument();
View Full Code Here

Examples of javax.xml.stream.XMLOutputFactory.createXMLStreamWriter()

            // Write XML content type
            response.setHeader("Content-Type", "text/xml");

            XMLOutputFactory outputFactory = XMLOutputFactory.newInstance();
            XMLStreamWriter xml = outputFactory.createXMLStreamWriter(response.getWriter());

            // Begin document
            xml.writeStartDocument();
            xml.writeStartElement("permissions");
            xml.writeAttribute("user", user.getUsername());
View Full Code Here

Examples of javax.xml.stream.XMLOutputFactory.createXMLStreamWriter()

     
      is = new FileInputStream(inputFile);
      reader = xif.createXMLStreamReader(is);
     
      os = new FileOutputStream(trainingOutputFile);
      writer = xof.createXMLStreamWriter(os);
      int trainingDataCount = extractXMLData(reader, writer, trainingDataSize);
      os.close();
     
      os = new FileOutputStream(testOutputFile);
      writer = xof.createXMLStreamWriter(os);
View Full Code Here

Examples of javax.xml.stream.XMLOutputFactory.createXMLStreamWriter()

      writer = xof.createXMLStreamWriter(os);
      int trainingDataCount = extractXMLData(reader, writer, trainingDataSize);
      os.close();
     
      os = new FileOutputStream(testOutputFile);
      writer = xof.createXMLStreamWriter(os);
      int testDataCount = extractXMLData(reader, writer, testDataSize);
      os.close();
     
      log.info("Extracted " + trainingDataCount + " rows of training data");
      log.info("Extracted " + testDataCount     + " rows of test data");
View Full Code Here

Examples of javax.xml.stream.XMLOutputFactory.createXMLStreamWriter()

    private void writeInfoPlist(File file) throws IOException {
        Writer out = new BufferedWriter(new FileWriter(file));
        XMLOutputFactory output = XMLOutputFactory.newInstance();

        try {
            XMLStreamWriter xout = output.createXMLStreamWriter(out);

            // Write XML declaration
            xout.writeStartDocument();
            xout.writeCharacters("\n");
View Full Code Here

Examples of javax.xml.stream.XMLOutputFactory.createXMLStreamWriter()

            StAXArtifactProcessor<Composite> processor = staxProcessors.getProcessor(Composite.class);
           
            ByteArrayOutputStream bos = new ByteArrayOutputStream();
            try {
                XMLOutputFactory outputFactory = XMLOutputFactory.newInstance();
                XMLStreamWriter writer = outputFactory.createXMLStreamWriter(bos);
                processor.write(composite, writer);
                writer.flush();
                writer.close();
            } catch (Exception ex) {
                System.out.println(ex.toString());
View Full Code Here

Examples of javolution.xml.stream.XMLOutputFactory.createXMLStreamWriter()

    public void save() throws OKMException {
        try {
            XMLOutputFactory outputFactory = XMLOutputFactory.newInstance();
            FileOutputStream stream = new FileOutputStream(documentFilename);
            XMLStreamWriter writer;
            writer = outputFactory.createXMLStreamWriter(stream,"UTF-8");
            writer.writeStartDocument("utf-8", "1.0");      // Header
            writer.writeStartElement("openkm");             // openkm node

            for (Iterator<OKMDocumentBean> it = docList.iterator(); it.hasNext();) {
                OKMDocumentBean doc = it.next();
View Full Code Here

Examples of org.apache.cxf.aegis.AegisContext.createXMLStreamWriter()

        if (genericType == null) {
            genericType = type;
        }
        AegisContext context = getAegisContext(type, genericType);
        AegisType aegisType = context.getTypeMapping().getType(genericType);
        AegisWriter<XMLStreamWriter> aegisWriter = context.createXMLStreamWriter();
        try {
            W3CDOMStreamWriter w3cStreamWriter = new W3CDOMStreamWriter();
            XMLStreamWriter spyingWriter = new PrefixCollectingXMLStreamWriter(w3cStreamWriter,
                                                                               namespaceMap);
            spyingWriter.writeStartDocument();
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.