Link to home
Start Free TrialLog in
Avatar of krs_rama
krs_rama

asked on

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

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>

ASKER CERTIFIED SOLUTION
Avatar of jwarnken
jwarnken
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial