Package javax.xml.stream

Examples of javax.xml.stream.XMLOutputFactory


           
      String encoding = "ISO-8859-1";
      BufferedReader in = new BufferedReader(new InputStreamReader(is, encoding));
      BufferedReader in_1 = new BufferedReader(new InputStreamReader(is_1, encoding));
     
      XMLOutputFactory factory = XMLOutputFactory.newInstance();
      XMLStreamWriter ch = factory.createXMLStreamWriter(os, "utf-8");

      String freq = get_FREQ_fromSDMX(sdmxFilePath);
     
      DataPage.convert(ch, id, in, in_1, freq, id,logFilePath);
     
View Full Code Here


    OutputStream os = new FileOutputStream(outputFilePath + id.substring(0,id.indexOf(".dic")) + ".rdf");
    XMLStreamWriter ch = null;
    List<Reader> rli = new ArrayList<Reader>();
    try {

      XMLOutputFactory factory = XMLOutputFactory.newInstance();
      ch = factory.createXMLStreamWriter(os, "utf-8");
     
      for (String lang : LANG) {
        StringReader sr = null;

        URL url = new URL("http://epp.eurostat.ec.europa.eu/NavTree_prod/everybody/BulkDownloadListing?file=dic/" + lang + "/" + id);
View Full Code Here

      for(HtmlColumn column : row.getColumns(ReservedFormat.ALL, ReservedFormat.XML)){
        headers.add(StringUtils.uncapitalize(column.getContent().toString()));
      }
    }

    XMLOutputFactory outputFactory = XMLOutputFactory.newInstance();
    XMLStreamWriter writer = null;
    String objectType = TableConfig.INTERNAL_OBJECTTYPE.valueFrom(table.getTableConfiguration()).toLowerCase();
   
    try {
      writer = outputFactory.createXMLStreamWriter(output);
      writer.writeStartDocument("1.0");
     
      writer.writeStartElement(objectType + "s");

      for (HtmlRow row : table.getBodyRows()) {
View Full Code Here

                streamWriter.close();
            }

            @Override
            protected XMLOutputFactory createXmlOutputFactory() {
                XMLOutputFactory outputFactory = XMLOutputFactory.newInstance();
                outputFactory.setProperty("javax.xml.stream.isRepairingNamespaces", Boolean.TRUE);
                return outputFactory;
            }
        };
    }
View Full Code Here

        response.setContentType(request.getResponseContentType());
        ResourceResolver resourceResolver = request.getResourceResolver();
        PageManager pageManager = resourceResolver.adaptTo(PageManager.class);
        Page page = pageManager.getContainingPage(request.getResource());

        XMLOutputFactory outputFactory = XMLOutputFactory.newFactory();
        try {
            XMLStreamWriter stream = outputFactory.createXMLStreamWriter(response.getWriter());
            stream.writeStartDocument("1.0");

            stream.writeStartElement("", "urlset", NS);
            stream.writeNamespace("", NS);
View Full Code Here

        // Write actual XML
        try {
            // 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("protocols");
View Full Code Here

            Directory<String, User> directory = context.getUserDirectory();

            // 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

        try {

            // 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

        try {

            // 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

                throw new GuacamoleSecurityException("No such user.");

            // 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

TOP

Related Classes of javax.xml.stream.XMLOutputFactory

Copyright © 2018 www.massapicom. 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.