Solved

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

Posted on 2007-04-04
3
721 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Deploying a Microsoft Access application in a Citrix environment is not difficult but takes a few steps. However, Citrix system people are often of little help, as they typically know next to nothing about Access. The script provided here will take …
This article discusses how to implement server side field validation and display customized error messages to the client.
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…

630 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