Examples of addRootElement()


Examples of org.jboss.xb.binding.AbstractMarshaller.addRootElement()

      throws Exception
   {
      StringWriter strWriter = new StringWriter();

      AbstractMarshaller marshaller = (AbstractMarshaller)Marshaller.FACTORY.getInstance();
      marshaller.addRootElement("http://jboss.org/xmbean", "xmbean", "mbean");
      marshaller.declareNamespace("xmbean", "http://jboss.org/xmbean");
      marshaller.declareNamespace("jdbcpm", "http://jboss.org/xmbean/persistence/jdbc");

      XMBeanMetaData xmbean = createXMBeanMetaData();
      ObjectModelProvider provider = XMBeanMetaDataProvider.INSTANCE;
View Full Code Here

Examples of org.jboss.xb.binding.XercesXsMarshaller.addRootElement()

      XercesXsMarshaller marshaller = new XercesXsMarshaller();

      marshaller.setSchemaResolver(RESOLVER);

      // we need to specify what elements are top most (roots) providing namespace URI, prefix and local name
      marshaller.addRootElement(PRODUCER_NAMESPACE, "", "producer-configuration");

      // declare default namespace
      marshaller.declareNamespace("wpc", PRODUCER_NAMESPACE);

      // add schema location by declaring xsi namespace and adding xsi:schemaLocation attribute
View Full Code Here

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

   public void testMarshalling() throws Exception
   {
      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();
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.