Package org.jboss.xb.binding.sunday.marshalling

Examples of org.jboss.xb.binding.sunday.marshalling.MarshallerImpl.declareNamespace()


      String ns = "http://www.jboss.org/test/xml/collections";

      MarshallerImpl marshaller = new MarshallerImpl();
      marshaller.addRootElement(new QName(ns, "collections"));
      marshaller.setRootTypeQName(new QName(ns, "collections"));
      marshaller.declareNamespace(null, ns);

      String xsd = getFullPath("xml/collections.xsd");
      StringWriter xml = new StringWriter();
      marshaller.marshal(xsd, new MappingObjectModelProvider(), Collections.getInstance(), xml);
View Full Code Here


   private String marshalImmutableParent(String xsd, Parent parent)
      throws IOException, SAXException
   {
      StringWriter writer = new StringWriter();
      MarshallerImpl marshaller = new MarshallerImpl();
      marshaller.declareNamespace("imm", "http://www.jboss.org/test/xml/immutable/");
      marshaller.marshal(xsd,
         new MappingObjectModelProvider(),
         parent,
         writer
      );
View Full Code Here

   private static String marshalChoiceRoot(String xsdUrl, Root root)
      throws IOException, SAXException
   {
      StringWriter writer = new StringWriter();
      MarshallerImpl marshaller = new MarshallerImpl();
      marshaller.declareNamespace("chs", "http://www.jboss.org/test/xml/choice/");
      //marshaller.setProperty(Marshaller.PROP_OUTPUT_INDENTATION, "false");
      marshaller.marshal(xsdUrl,
         new MappingObjectModelProvider(),
         root,
         writer
View Full Code Here

      String ns = "http://www.jboss.org/test/xml/collections";

      MarshallerImpl marshaller = new MarshallerImpl();
      marshaller.addRootElement(new QName(ns, "collections"));
      marshaller.setRootTypeQName(new QName(ns, "collections"));
      marshaller.declareNamespace(null, ns);

      String xsd = getFullPath("xml/collections.xsd");
      StringWriter xml = new StringWriter();
      marshaller.marshal(xsd, new MappingObjectModelProvider(), Collections.getInstance(), xml);
View Full Code Here

   private String marshalImmutableParent(String xsd, Parent parent)
      throws IOException, SAXException
   {
      StringWriter writer = new StringWriter();
      MarshallerImpl marshaller = new MarshallerImpl();
      marshaller.declareNamespace("imm", "http://www.jboss.org/test/xml/immutable/");
      marshaller.marshal(xsd,
         new MappingObjectModelProvider(),
         parent,
         writer
      );
View Full Code Here

   private static String marshalChoiceRoot(String xsdUrl, Root root)
      throws IOException, SAXException
   {
      StringWriter writer = new StringWriter();
      MarshallerImpl marshaller = new MarshallerImpl();
      marshaller.declareNamespace("chs", "http://www.jboss.org/test/xml/choice/");
      //marshaller.setProperty(Marshaller.PROP_OUTPUT_INDENTATION, "false");
      marshaller.marshal(xsdUrl,
         new MappingObjectModelProvider(),
         root,
         writer
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.