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>

Is it possible to convert XML into a Class?
vampire85
You can write something that generates the class for you and populates it. If the XML is known and you generate the class first, it will be easier.
StLaEmpira
hi
i think you cant convert this xml to class, because xml should compatable with Dataset, then only you can convert to class, any this is the tool to convert xml in to class.
xsd.xml
class to schema conversion and schema to class conversion.
-thanks
Meas Pheng
CaffeineMartini
Hi,
VS2003 is at:
C:\Program Files\Microsoft Visual Studio .NET 2003\SDK\v1.1\Bin\xsd.exe
mbakhodir
John A. Bocharov - MSFT
The xsd.exe is at.
C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Bin\xsd.exe
You may be able to run it when you run the Visual Studio 2005 Command Prompt.
RobertV
Jeffyoung1234
Use XmlSerializer.
http://msdn2.microsoft.com/en-us/library/system.xml.serialization.xmlserializer(VS.80).aspx
http://msdn.microsoft.com/library/default.asp url=/library/en-us/cpref/html/frlrfSystemXmlSerializationXmlSerializerClassTopic.asp