[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

6.7

XML parsing with many children using ASP/VBscript

Asked by gormly in Extensible Markup Language (XML), Active Server Pages (ASP)

Tags: xml, vbscript, parse, asp

I know this is probably simple for many people but I am having a lot of trouble figuring out how to work a complex XML file.

I need to load data from an xml file into a database.
I can handle all the database code but parsing the xml document correctly is the tough part.
I cannot seem to find any information on how to parse beyond a parnet and a child.

Here is a sample of the xml:

- <ORDER>
<TimeDate>11-12-07 15:06:01</TimeDate>
<ProMember>1000</ProMember>
<PODate>10-09-07</PODate>
<PONumber>48079</PONumber>
- <SpecialInstructions>
- <Instruction>
- <![CDATA[ MCS]]>
 </Instruction>
</SpecialInstructions>
- <Terms>
- <![CDATA[ 2% 10TH]]>
 </Terms>
<OrderTotal>30.80</OrderTotal>
- <Detail>
- <Product>
- <![CDATA[ 11114-7]]>
</Product>
<Quantity>10</Quantity>
<Cost>3.08</Cost>
- <Description><![CDATA[ BOX FRAME- 11X14]]>
</Description>
- <Product>
</Detail>
 </ORDER>
- <ORDER>
<TimeDate>11-13-07 12:22:02</TimeDate>
<ProMember>2333</ProMember>
<PODate>10-10-07</PODate>
<PONumber>3465426</PONumber>
- <SpecialInstructions>
- <Instruction>
- <![CDATA[ Welltom]]>
 </Instruction>
</SpecialInstructions>
- <Terms>
- <![CDATA[ 3% 10TH]]>
 </Terms>
<OrderTotal>20.80</OrderTotal>
- <Detail>
- <Product>
- <![CDATA[ 11114-7]]>
</Product>
<Quantity>10</Quantity>
<Cost>2.08</Cost>
- <Description><![CDATA[ Circle FRAME- 8X8]]>
</Description>
- <Product>
</Detail>
 </ORDER>

I have to parse the Order details, Time, Member, PO, Terms and Special instructions and then each product included in the order (there could be hundreds).

I cannot seem to get past just the order details themselves, I cannot seem to get the product details at all.
I am totally stuck.  Can someone shed some light?



1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
- <ORDER>
	<TimeDate>11-12-07 15:06:01</TimeDate> 
	<ProMember>1000</ProMember> 
	<PODate>10-09-07</PODate> 
	<PONumber>48079</PONumber> 
	- <SpecialInstructions>
		- <Instruction>
		- <![CDATA[ MCS]]> 
          </Instruction>
	  </SpecialInstructions>
	- <Terms>
	- <![CDATA[ 2% 10TH]]> 
	  </Terms>
	<OrderTotal>30.80</OrderTotal> 
	- <Detail>
		- <Product>
		- <![CDATA[ 11114-7]]> 
		  </Product>
		  <Quantity>10</Quantity> 
          <Cost>3.08</Cost> 
		  - <Description><![CDATA[ BOX FRAME- 11X14]]>
            </Description>
		- <Product>
	  </Detail>
  </ORDER>
- <ORDER>
	<TimeDate>11-13-07 13:03:01</TimeDate> 
	<ProMember>1233</ProMember> 
	<PODate>10-10-07</PODate> 
	<PONumber>43535</PONumber> 
	- <SpecialInstructions>
		- <Instruction>
		- <![CDATA[ MCS2]]> 
          </Instruction>
	  </SpecialInstructions>
	- <Terms>
	- <![CDATA[ 5% 8TH]]> 
	  </Terms>
	<OrderTotal>20.20</OrderTotal> 
	- <Detail>
		- <Product>
		- <![CDATA[ 11114-7]]> 
		  </Product>
		  <Quantity>10</Quantity> 
          <Cost>2.02</Cost> 
		  - <Description><![CDATA[ RECT FRAME- 8X11]]>
            </Description>
		- <Product>
	  </Detail>
  </ORDER>
[+][-]11/19/07 09:07 AM, ID: 20313677Accepted Solution

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

About this solution

Zones: Extensible Markup Language (XML), Active Server Pages (ASP)
Tags: xml, vbscript, parse, asp
Sign Up Now!
Solution Provided By: eulac
Participating Experts: 3
Solution Grade: B
 
[+][-]11/19/07 08:44 AM, ID: 20313535Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]11/19/07 08:56 AM, ID: 20313603Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]11/19/07 10:24 AM, ID: 20314204Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]12/05/07 09:22 AM, ID: 20413201Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]12/20/08 07:21 AM, ID: 23218527Administrative Comment

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 30-day free trial to view this Administrative Comment or ask the Experts your question.

 
[+][-]12/22/08 05:43 AM, ID: 23226305Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]12/22/08 05:57 AM, ID: 23226388Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]12/23/08 06:24 AM, ID: 23233690Administrative Comment

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 30-day free trial to view this Administrative Comment or ask the Experts your question.

 
[+][-]12/23/08 06:58 AM, ID: 23233928Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]12/23/08 07:36 AM, ID: 23234213Administrative Comment

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 30-day free trial to view this Administrative Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091118-EE-VQP-93 / EE_QW_2_20070628