none
Is it possible to convert XML into a Class?

    Question

  • Given an XML stream as below, is there any possibility to convert the same into any treditional class style with . (dots) as seperator of the nodes of the xml file...

    for instance

    bank.code.tostring() should reslut me "5070" and

    bank.description.tostring() should result "ICICI - Bangalore"

    bank.location.destination.code should result "MB"

    bank.location.zone.code.tostring() should result "12" etc .,

    And the XML file being ...

    <?xml version="1.0" encoding="utf-8" ?>

    <MainBank>

          <bank>

                <code>5070</code>

                <description>ICICI - Bangalore</description>

                <contactPerson>Peter Loke</contactPerson>

                <location>

                      <destination>

                            <code>MB</code>

                            <description>Main Branch at Mayohall</description>

                      </destination>

                      <zone>

                            <code>12</code>

                            <description>Admin building and 8to8Branch</description>

                      </zone>

                </location>

                <catagory>

                      <code>1LL</code>

                      <description>Admin with ExchRout plus Hub</description>

                </catagory>

                <exchContact>E839IRU</exchContact>

                <isTT>true</isTT>

                <classification>F98X</classification>

                <branchDets>

                      <code>8525</code>

                      <description>Administration Branch from 3rd_u70 ?loor Onwards</description>

                      <floors>3,4</floors>

                      <type>FA</type>

                      <description>

                            <detail>Fully Automated</detail>

                            <ATM>True</ATM>

                            <eTT>False</eTT>

                      </description>

                      <offices>

                            <offtype>

                                  <code>SA</code>

                                  <description>System Admin</description>

                            </offtype>

                            <currency>INR</currency>

                            <frCur>false</frCur>

                      </offices>

                </branchDets>

          </bank>

          <bank>

                <code>5071</code>

                <description>ICICI - Mumbai</description>

                <contactPerson>Jane Edwards</contactPerson>

                <location>

                      <destination>

                            <code>MB</code>

                            <description>Main Branch at VT</description>

                      </destination>

                      <zone>

                            <code>12</code>

                            <description>Admin building and 8to8Branch</description>

                      </zone>

                </location>

                <catagory>

                      <code>1LL</code>

                      <description>Admin with ExchRout plus Hub</description>

                </catagory>

                <exchContact>E839IRU</exchContact>

                <isTT>true</isTT>

                <classification>F98X</classification>

                <branchDets>

                      <code>8525</code>

                      <description>Administration Branch from 3rd_u70 ?loor Onwards</description>

                      <floors>3,4,5,6</floors>

                      <type>FA</type>

                      <description>

                            <detail>Fully Automated</detail>

                            <ATM>True</ATM>

                            <eTT>False</eTT>

                      </description>

                      <offices>

                            <offtype>

                                  <code>SA</code>

                                  <description>System Admin</description>

                            </offtype>

                            <currency>INR</currency>

                            <currency>USD</currency>

                            <frCur>True</frCur>

                      </offices></branchDets></bank></MainBank>

     

    Friday, April 28, 2006 8:44 AM

Answers

  • Hi,

    VS2003 is at:

    C:\Program Files\Microsoft Visual Studio .NET 2003\SDK\v1.1\Bin\xsd.exe

    Saturday, April 29, 2006 6:25 AM

All replies