Click to See Complete Forum and Search --> : Parsing XML Files


enigmaos
September 10th, 2001, 07:45 AM
I'm trying to parse every element/data out of some XML files (i.e. caseid, caseType, etc. shown below), but I'm stuck. I have tried several sample code/projects, but they don't work. The XML files I have to parse are similar to this:

<ExampleXML>
<CaseGroup>
<clientid="client999"/>
<clientid="client888"/>
<datetime>02-12-2001 15:55</datetime>
<case caseid="999999" caseType="Hard">

<Result>
<Value>ReceiptID</Value>
<Data>12345</Data>
</Result>
<Result>
<Value>WorkOrder</Value>
<Data>54321</Data>
</Result>
<Result>
<Value>ContactID</Value>
<Data>666666</Data>
</Result>
<Result>
<Value>Other</Value>
<Data>888888</Data>
</Result>
<Extra>Extra data</Extra>
<Other>Other Information</Other>
</case>

<NEWa>11111111111111111</NEWa>
<NEWb>222222222222222222</NEWb>
<NEWc>3333333333333333333</NEWc>
</CaseGroup>



<client clientid="client999">
<FirstName>John</FirstName>
<MiddleName>M.</MiddleName>
<LastName>Smith</LastName>

<ADDRESS>
<Address1>999 Street<Address1>
<City>CityName</City>
<State>StateName</State>
<PostalCode>111111</PostalCode>
<Extra>XXXXXXXX</Extra>
</ADDRESS>

<OtherAddress>NONE</OtherAddress>
<OtherLocation>NONE</OtherLocation>
<CONTACTDETAIL>
<CONTACTPOINT ContactPointRoleType="Home" ContactPointType="Phone">
<ContactPointValue>9999999999</ContactPointValue>
</CONTACTPOINT>
<CONTACTPOINT ContactPointRoleType="Work" ContactPointType="Phone">
<ContactPointValue>8888888888</ContactPointValue>
</CONTACTPOINT>
<CONTACTPOINT ContactPointRoleType="Work" ContactPointType="Fax">
<ContactPointValue>6666666666</ContactPointValue>
</CONTACTPOINT>
<CONTACTPOINT ContactPointRoleType="Home" ContactPointType="Fax">
<ContactPointValue>5555555555</ContactPointValue>
</CONTACTPOINT>
<CONTACTPOINT ContactPointRoleType="Work" ContactPointType="Cell">
<ContactPointValue>4444444444</ContactPointValue>
</CONTACTPOINT>
<OtherFName>Joe</OtherFName>
<OtherMName>M.</OtherMName>
<OtherLName>Leverage</OtherLName>
</CONTACTDETAIL>
<OtherExtra>EmergencyContact</OtherExtra>
</client>
</ExampleXML>

THANKS!!!!

slcotten
September 10th, 2001, 12:12 PM
Are you using the XML 3 Parser?

enigmaos
September 10th, 2001, 01:14 PM
do you have a sample code of that XML Parser?

slcotten
September 10th, 2001, 01:27 PM
Try this example

http://www.planetsourcecode.com/xq/ASP/txtCodeId.10588/lngWId.1/qx/vb/scripts/ShowCode.htm

surya_srm
September 29th, 2005, 12:17 AM
Please help me to download the Parsing XML Files