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

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


      SchemaBinding schema = getSchema();
      MarshallerImpl marshaller = getMarshaller();
      StringWriter writer = new StringWriter();
      GlobalElement global = new GlobalElement();
      global.stringElement = GlobalElement.TEXT;
      marshaller.marshal(schema, null, global, writer);
      assertXmlEqual(XML_STRING_ELEMENT, writer.getBuffer().toString());
   }

   public void testTermAfterUnmarshallingHandler_stringElement() throws Exception
   {
View Full Code Here


      SchemaBinding schema = getSchema();
      MarshallerImpl marshaller = getMarshaller();
      StringWriter writer = new StringWriter();
      GlobalElement global = new GlobalElement();
      global.sequenceItem = GlobalElement.STRING_TYPE;
      marshaller.marshal(schema, null, global, writer);
      assertXmlEqual(XML_SEQUENCE_ITEM, writer.getBuffer().toString());
   }

   public void testTermAfterUnmarshallingHandler_sequenceItem() throws Exception
   {
View Full Code Here

      global.listOfLists = LIST_OF_LISTS;

      MarshallerImpl marshaller = new MarshallerImpl();
      marshaller.setProperty(Marshaller.PROP_OUTPUT_INDENTATION, "false");
      StringWriter writer = new StringWriter();
      marshaller.marshal(SCHEMA, null, global, writer);

      String marshalled = writer.getBuffer().toString();
      assertXmlEqual(LIST_OF_LISTS_XML, marshalled);
   }
View Full Code Here

         throws IOException, SAXException
   {
      SCHEMA.setXopMarshaller(xopMarshaller);
      StringWriter writer = new StringWriter();
      MarshallerImpl marshaller = new MarshallerImpl();
      marshaller.marshal(SCHEMA, null, e, writer);
      return writer.getBuffer().toString();
   }

   private static String getOptimizedXml(String elementName)
   {
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.