You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xmlbeans-user@xml.apache.org by Dan Sterling <ds...@sct.com> on 2004/01/28 22:09:20 UTC

Example marshalling to XML

Hello,

  I'm looking for an example that shows how to marshal an XML beans
object to xml.  I've reviewed the documentation but do not see any
examples.  The getting starting guide shows the following:

public PurchaseOrderDocument createPO()
{
    PurchaseOrderDocument newPODoc =
PurchaseOrderDocument.Factory.newInstance();
    PurchaseOrder newPO = newPODoc.addNewPurchaseOrder();
    Customer newCustomer = newPO.addNewCustomer();
    newCustomer.setName("Doris Kravitz");
    newCustomer.setAddress("Bellflower, CA");
    return newPODoc;
}

What is the process of making PurchaseOrderDocument marshal itself
into an XML string representation so I can save it to a file?

Also,  there is a reference in the documentation to program samples
that does not work.  Where can I find some sample programs to review.

Thank you.
Dan




- ---------------------------------------------------------------------
To unsubscribe, e-mail:   xmlbeans-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xmlbeans-user-help@xml.apache.org
Apache XMLBeans Project -- URL: http://xml.apache.org/xmlbeans/