Wildone63
asked on
Need to parse a file
I need to get each of the fields seperated out.
Each field is in <> Each Record starts with <Bundle>
Can anyone help me please. I get about 25 of these files a day.
I am getting Excel files, with the "Stuff" below in in the first cell. "A1"
<bundle><item id="opt1"><form><checkbox id="500SheetPaperTray" label="500 Sheet Paper Tray"/><checkbox id="Stand" label="Stand"/><text id="Name" label="Requestor Name"/><text id="Phone" label="Contact Phone Number"/><text id="CompanyAddress" label="Company Address Code (WHQKF)"/><text id="Shipping" label="Shipping Address" multiline="true"/><text id="AccountNumber" label="10 Digit Account Number"/><text id="AdditionalInformation" label="Additional Information" multiline="true"/></form>< /item><ite m id="opt2"><form><checkbox id="Power" label="Power Outlet"/><checkbox id="Fax" label="Fax Line"/><checkbox id="Network" label="Network Line"/><checkbox id="IP" label="IP Address"/><text id="AdditionalInfo" label="Additional Information" multiline="true"/></form>< /item></bu ndle>
This is the second Cell: "A2"
<bundle><item id="opt1"><form><checkbox id="500SheetPaperTray" label="500 Sheet Paper Tray"/><checkbox id="Stand" label="Stand"/><text id="Name" label="Requestor Name"/><text id="Phone" label="Contact Phone Number"/><text id="CompanyAddress" label="Company Address Code (WHQKF)"/><text id="Shipping" label="Shipping Address" multiline="true"/><text id="AccountNumber" label="10 Digit Account Number"/><text id="AdditionalInformation" label="Additional Information" multiline="true"/></form>< /item><ite m id="opt2"><form><checkbox id="Power" label="Power Outlet"/><checkbox id="Fax" label="Fax Line">true</checkbox><chec kbox id="Network" label="Network Line">true</checkbox><chec kbox id="IP" label="IP Address">true</checkbox><t ext id="AdditionalInfo" label="Additional Information" multiline="true"/></form>< /item></bu ndle>
Each field is in <> Each Record starts with <Bundle>
Can anyone help me please. I get about 25 of these files a day.
I am getting Excel files, with the "Stuff" below in in the first cell. "A1"
<bundle><item id="opt1"><form><checkbox id="500SheetPaperTray" label="500 Sheet Paper Tray"/><checkbox id="Stand" label="Stand"/><text id="Name" label="Requestor Name"/><text id="Phone" label="Contact Phone Number"/><text id="CompanyAddress" label="Company Address Code (WHQKF)"/><text id="Shipping" label="Shipping Address" multiline="true"/><text id="AccountNumber" label="10 Digit Account Number"/><text id="AdditionalInformation"
This is the second Cell: "A2"
<bundle><item id="opt1"><form><checkbox id="500SheetPaperTray" label="500 Sheet Paper Tray"/><checkbox id="Stand" label="Stand"/><text id="Name" label="Requestor Name"/><text id="Phone" label="Contact Phone Number"/><text id="CompanyAddress" label="Company Address Code (WHQKF)"/><text id="Shipping" label="Shipping Address" multiline="true"/><text id="AccountNumber" label="10 Digit Account Number"/><text id="AdditionalInformation"
Do you still need help?
ASKER
Yes.
I have looked into the xml reader but I can not figure out how to make it work with this because the Tags are a little bit confusing to me.
I have looked into the xml reader but I can not figure out how to make it work with this because the Tags are a little bit confusing to me.
@Wildone63,
Are you getting anywhere with this?
I've done some xml parsing with VB in the past and I started cobbling together some old snippets of code last evening with this question in mind. I wanted to check first to see if it's still unresolved before I put any real time into it.
Are you getting anywhere with this?
I've done some xml parsing with VB in the past and I started cobbling together some old snippets of code last evening with this question in mind. I wanted to check first to see if it's still unresolved before I put any real time into it.
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER
Thank You.
http://msdn.microsoft.com/en-us/library/cc189056(v=vs.95).aspx
Each content is an xml string. From the example on the link, just replace xmlString with your cell contents.
Once loaded you can use:
ReadToFollowing method to fetch specific data:
http://social.msdn.microsoft.com/forums/en-US/xmlandnetfx/thread/9e528f4e-0d29-49ce-b092-e747f53b8bf0