Package javax.xml.stream

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


         for (String prop : props)
            sw.writeEmptyElement("D", prop, "DAV:");

         sw.writeEndElement(); // prop
         sw.writeEndElement(); // propfind
         sw.writeEndDocument();
         out.close();
      }
      catch (XMLStreamException e)
      {
         log.error(e.getLocalizedMessage(), e);
View Full Code Here


            sw.writeEndElement(); // remove
         }

         sw.writeEndElement(); // propertyupdate

         sw.writeEndDocument();
         out.close();
      }
      catch (XMLStreamException e)
      {
         log.error(e.getLocalizedMessage(), e);
View Full Code Here

         sw.writeStartElement("D", "href", "DAV:");
         sw.writeCharacters("http://exoplatform.org");
         sw.writeEndElement(); // href
         sw.writeEndElement(); // owner
         sw.writeEndElement(); // lockinfo
         sw.writeEndDocument();

      }
      catch (XMLStreamException e)
      {
         log.error(e.getLocalizedMessage(), e);
View Full Code Here

         writer.writeEndElement();
         writer.writeEndElement();
      }

      writer.writeEndElement();
      writer.writeEndDocument();
   }

   /**
    * Import references from xml-file.
    *
 
View Full Code Here

        try {
            XMLStreamWriter xmlStreamWriter = output.createXMLStreamWriter(writer);
            xmlStreamWriter.writeStartDocument();
            writeElement(element, xmlStreamWriter);
            xmlStreamWriter.writeEndDocument();
        } catch (XMLStreamException exception) {
            throw new SerializationException(exception);
        }
    }
View Full Code Here

                XMLStreamWriter xtw = message.getContent(XMLStreamWriter.class);
                if (xtw != null) {
                    xtw.writeEndElement();           
                    // Write Envelope end element
                    xtw.writeEndElement();
                    xtw.writeEndDocument();
                   
                    xtw.flush();
                }
            } catch (XMLStreamException e) {
                throw new SoapFault(new org.apache.cxf.common.i18n.Message("XML_WRITE_EXC", BUNDLE), e,
View Full Code Here

        try {
            XMLStreamWriter xmlStreamWriter = createStreamWriter(aegisType.getSchemaType(), os);
            // use type qname as element qname?
            xmlStreamWriter.writeStartDocument();
            aegisWriter.write(obj, aegisType.getSchemaType(), false, xmlStreamWriter, aegisType);
            xmlStreamWriter.writeEndDocument();
            xmlStreamWriter.close();
        } catch (Exception e) {
            throw new WebApplicationException(e);
        }
    }
View Full Code Here

        public void handleMessage(Message message) throws Fault {
            try {
                XMLStreamWriter xtw = message.getContent(XMLStreamWriter.class);
                if (xtw != null) {
                    xtw.writeEndDocument();
                    xtw.close();
                }

                OutputStream os = (OutputStream)message.get(OUTPUT_STREAM_HOLDER);
                if (os != null) {
View Full Code Here

            wrt.writeStartDocument();
            wrt.writeStartElement("root");
           
            validator.exportState(new ExportWriter(wrt));
       
            wrt.writeEndDocument();
           
            wrt.close();
           
            StringReader input = new StringReader(output.toString());
           
View Full Code Here

                    break;
                case XMLStreamConstants.DTD:
                    wrt.writeDTD(rdr.getText());
                    break;
                case XMLStreamConstants.END_DOCUMENT:
                    wrt.writeEndDocument();
                    break;
                case XMLStreamConstants.END_ELEMENT:
                    if (PROPERTY_TAG_NAME.equals(rdr.getName().getLocalPart())) {
                        String encoding = rdr.getEncoding();
                        if (encoding == null) {
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.