Web Analytics Made Easy -
StatCounter Can i actually do this with JSON? - CodingForum

Announcement

Collapse
No announcement yet.

Can i actually do this with JSON?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Can i actually do this with JSON?

    Quick one.. (i hope).

    Can i actually go from :

    <?xml version="1.0" encoding="UTF-8"?>
    <customermodel:Customer xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:customermodel="http://customermodel" xmlnsersonal="http://customermodel/personal" id="1" age="1" name="Joe">
    <bankAccounts xsi:type="customermodel:BankAccount" accountNo="10" bankName="HSBC" testBoolean="true" testDate="2006-10-23" testDateTime="2006-10-23T22:15:01+08:00" testDecimal="20.2" testTime="22:15:01+08:00">
    <count>0</count>
    <bankAddressLine>HSBC</bankAddressLine>
    <bankAddressLine>London</bankAddressLine>
    <bankAddressLine>31 florence</bankAddressLine>
    <bankAddressLine>Swindon</bankAddressLine>
    </bankAccounts>
    </customermodel:Customer>


    to Json (using json-lib) to preserve what are attributes/elements.

    Then convert back again to exactly the same (xsd validation) XML? or is this just not possible without writing my own parser?

    I would have thought this would be simple to do.. but I cannot find a method.

    Thanks
Working...
X