Solved

How to read XML schema data into variables using ASP (VB or Javascript)

Posted on 2007-04-04
3
712 Views
Last Modified: 2008-01-09
Hi , Please hlep me to read XML data from ASP (using VBscript or Javascript).  
All i want is to get the values of Name,Telephone and Email in to seperate variables  and display them in the browser using vbscript or javascript in ASP.
thanks - krs_rama

Here is my XML File (website and other things are renamed on purpose) :
<?xml version="1.0" encoding="utf-8"?>
<DataSet xmlns="http://someurl.net/maint">
      <xs:schema id="Accounts" targetNamespace="http://someurl.net/maint" xmlns:mstns="http://someurl.net/maint" xmlns="http://someurl.net/maint" xmlns:xs="http://www.url.com/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" attributeFormDefault="qualified" elementFormDefault="qualified">
            <xs:element name="Accounts" msdata:IsDataSet="true" msdata:UseCurrentLocale="true">
                  <xs:complexType>
                        <xs:choice minOccurs="0" maxOccurs="unbounded">
                              <xs:element name="Account">
                                    <xs:complexType>
                                          <xs:sequence>
                                                <xs:element name="Name" type="xs:string" minOccurs="0"/>                                                
                                                <xs:element name="E_Mail" type="xs:string" minOccurs="0"/>
                                                <xs:element name="Telephone" type="xs:string" minOccurs="0"/>                                                
                                          </xs:sequence>
                                    </xs:complexType>
                              </xs:element>
                        </xs:choice>
                  </xs:complexType>
            </xs:element>
      </xs:schema>
      <diffgr:diffgram xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:diffgr="urn:schemas-microsoft-com:xml-diffgram-v1">
            <Accounts>
                  <Account diffgr:id="Account1" msdata:rowOrder="0" diffgr:hasChanges="inserted">                        
                        <Name>John Trevor</Name>                        
                        <E_Mail>testchat@worldwideweb.com</E_Mail>
                        <Telephone>1888324366</Telephone>                        
                  </Account>
            </Accounts>
      </diffgr:diffgram>
</DataSet>

0
Comment
Question by:krs_rama
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 8

Accepted Solution

by:
jwarnken earned 50 total points
ID: 18857411
The Scripting guys have a good example of how to read xml into vbscript

http://www.microsoft.com/technet/technetmag/issues/2007/02/HeyScriptingGuy/
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The task A number given should be formatted for easy reading by separating digits into triads. Format must be made inline via JavaScript, i.e., frameworks / functions are not welcome. So let’s take a number like this “12345678.91¿ and format i…
This article is the result of a quest to better understand Task Scheduler 2.0 and all the newer objects available in vbscript in this version over  the limited options we had scripting in Task Scheduler 1.0.  As I started my journey of knowledge I f…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question