Advertisement

09.14.2008 at 12:15AM PDT, ID: 23729747
[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!

8.8

Need to import an XML document with a DTD into SQL via ASP

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

Hello,

 Ive programmed in ASP for years but never really got my head around the whole XML thing. I understand its just text but working with it in asp seems complex to me and I never got the hang of it yet. Im hoping you can please help me figure this out...

I host at godaddy and they have the following XML components installed:
Microsoft XMLDOM 3.0 Component
Microsoft XMLDOM 4.0 Component
Microsoft ServerXMLHTTP
Microsoft XMLDOM Component
Microsoft XMLHTTP Component

The DTD im using looks like this:
<!ELEMENT Catalog ( Category* ) >
<!ELEMENT Category ( Name, Site*, Category* ) >
<!ELEMENT Commission ( #PCDATA ) >
<!ELEMENT Description ( #PCDATA ) >
<!ELEMENT EarnedPerSale ( #PCDATA ) >
<!ELEMENT TotalEarningsPerSale ( #PCDATA ) >
<!ELEMENT TotalRebillAmt ( #PCDATA ) >
<!ELEMENT HasRecurringProducts ( #PCDATA ) >
<!ELEMENT Gravity ( #PCDATA ) >
<!ELEMENT Id ( #PCDATA ) >
<!ELEMENT Name ( #PCDATA ) >
<!ELEMENT PercentPerSale ( #PCDATA ) >
<!ELEMENT PopularityRank ( #PCDATA ) >
<!ELEMENT Referred ( #PCDATA ) >
<!ELEMENT Site ( Commission? | Description+ | EarnedPerSale? | TotalEarningsPerSale? | TotalRebillAmt? | Gravity? | Id+ | PercentPerSale? | PopularityRank+ | Referred? | Title+ | HasRecurringProducts )* >
<!ELEMENT Title ( #PCDATA ) >

All I am trying to do is to open up the xml file, and read in each row of this database and put each element into its own variable and then do a do until eof type loop... being able to iterate through each row means I could then put this data easily into my SQL server as I need it to be.

Dont laugh...heres the best code I could get done so far to do this..

  Dim objXMLDom,t
  Set objXMLDOM = Server.CreateObject("Microsoft.XMLDOM")
      
  objXMLDOM.async = False
  objXMLDom.load(Server.MapPath("mybusiness.xml"))

  Dim objChild
  for each objChild in objXMLDOM.documentElement.childNodes
    Response.write(objChild.nodename)
    'Response.write(": ")
    'response.write(objChild.text & "<BR><BR>")
    response.write "<BR><BR>"
    response.flush
  next

  Set objXMLDom = Nothing

But it doesnt work so well... Can anyone on here please help me figure out how to parse my xml file properly?

Thanks!Start Free Trial
 
Keywords: Need to import an XML document with …
 
Loading Advertisement...
 
[+][-]09.14.2008 at 12:36AM PDT, ID: 22471465

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 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.14.2008 at 12:54AM PDT, ID: 22471494

View this solution now by starting your 7-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)
Sign Up Now!
Solution Provided By: hielo
Participating Experts: 1
Solution Grade: A
 
 
[+][-]09.14.2008 at 01:50AM PDT, ID: 22471586

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 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.14.2008 at 02:02AM PDT, ID: 22471609

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 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.14.2008 at 02:23AM PDT, ID: 22471639

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 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.14.2008 at 08:55AM PDT, ID: 22473125

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]09.15.2008 at 04:46PM PDT, ID: 22483848

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 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628