14 Replies Latest reply on Dec 1, 2008 8:15 PM by sunnycode

    How to use XMLEncoder or similar to generate a complicated XML??

    sunnycode
      Dear friends, good weekend and happy thanksgivings.
      I met a problem when I use XMLEncoder to generate a complicated XML like following:
      <?xml version="1.0"?>
      <messages>
        <note ID="501">
          <to>Tove</to>
           <DeliveryAddress>
                <Street>12345</Street>
                <City>Parsinpany</City>
                <County>ABC</County>
                <State>NJ</State>
                <Country>USA</Country>
               </DeliveryAddress>
           <ContactID>
                <CompanyID>
                     <Address>12345</Address>
                     <City>Alnomre</City>
                     <County>BBB</County>
                     <State>TX</State>
                     <Country>USA</Country>
                    </CompanyID>
                <phone>1800-1234567</phone>
                <fax>123-456-7890</fax>
               </ContactID>
          <from>Jani</from>
          <heading>Reminder</heading>
          <body>Don't forget me this weekend!</body>
        </note>
        <note ID="502">
          <to>Jani</to>
          <from>Tove</from>
          <heading>Re: Reminder</heading>
          <body>I will not!</body>
        </note> 
      </messages>
      How to use XMLEncoder to generate abobe XML or one that has namespaces in it??
      any good example??


      Thanks