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-ms data" attributeFormDefault="qual ified" elementFormDefault="qualif ied">
<xs:element name="Accounts" msdata:IsDataSet="true" msdata:UseCurrentLocale="t rue">
<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-ms data" xmlns:diffgr="urn:schemas- microsoft- com:xml-di ffgram-v1" >
<Accounts>
<Account diffgr:id="Account1" msdata:rowOrder="0" diffgr:hasChanges="inserte d">
<Name>John Trevor</Name>
<E_Mail>testchat@worldwide web.com</E _Mail>
<Telephone>1888324366</Tel ephone>
</Account>
</Accounts>
</diffgr:diffgram>
</DataSet>
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-
<xs:element name="Accounts" msdata:IsDataSet="true" msdata:UseCurrentLocale="t
<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-
<Accounts>
<Account diffgr:id="Account1" msdata:rowOrder="0" diffgr:hasChanges="inserte
<Name>John Trevor</Name>
<E_Mail>testchat@worldwide
<Telephone>1888324366</Tel
</Account>
</Accounts>
</diffgr:diffgram>
</DataSet>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.