Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2007-04-04
3
Medium Priority
?
731 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 200 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

The top UI technologies you need to be aware of

An important part of the job as a front-end developer is to stay up to date and in contact with new tools, trends and workflows. That’s why you cannot miss this upcoming webinar to explore the latest trends in UI technologies!

Question has a verified solution.

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

This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
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…

688 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