Doubt Regarding-Downloading XML file using Javascript

3 views
Skip to first unread message

sathiya subramanian

unread,
Oct 22, 2005, 3:22:45 AM10/22/05
to Techdot...@googlegroups.com
Dear All,
 
  Please Kindly Clarify my doubt.
 

1.From the Database i have extracted the contents using datatset.

2.with the help of dataset,i m creating an xml file.

3.this xml file gets loaded in a separate folder in my web server.(eg:/data/emp.xml)

4.i will do this when the application starts.

5.when any one of the user try to access a page,

i want to read this xml file using javascript.
since xml file gets downloaded using javascript i dont want to go back to the Web server. so i implemented this way. i.e.My page wont refreshed again

i can able to do this also.

My doubt is that will this xml file will get downloaded into client machine or not.In other words will this xml file resides physically in client pc or not.

when i searched for this emp.xml it doesnt resides physically.then how we can conclude that it has been downloaded using javascript?

Thanking You,

With Regards,

sathiyajs

Ravi

unread,
Oct 22, 2005, 3:38:59 AM10/22/05
to Techdot...@googlegroups.com
Hi,
 
Have u wrote the data from the dataset to ur xml file?.Initially it will say access denied,u need to give access to ur webfolder(eg:/data/) and use the method dataset.writeXml()  to write the contents and read it using js
 
Try and reply
regards,
ravi

sathiya subramanian

unread,
Oct 22, 2005, 4:18:28 AM10/22/05
to Techdot...@googlegroups.com
Dear Ravi,
I have given all these things u have specified .
i can able to get the xml file and i can able to read it but my question is that will that xml file lies physically in the client pc.
 
with regards,
sathiyajs

 

ST Sreetharan

unread,
Oct 22, 2005, 4:32:59 AM10/22/05
to Techdot...@googlegroups.com
Hi Sathya
         you told that "I have give", so could you plz populate the code in group??
 
Thanx & Regards
Sreetharan S.T

Ravi

unread,
Oct 22, 2005, 6:13:49 AM10/22/05
to Techdot...@googlegroups.com
yes it will be availabe in ur web directory

sathiya subramanian

unread,
Oct 24, 2005, 5:31:33 AM10/24/05
to Techdot...@googlegroups.com
Dear Sreetharan,
 
Below i have pasted the codings .
 

If Not IsPostBack Then

con =

New SqlConnection("workstation id=WIN;packet size=4096;user id=sa;password=jktsql;data source=SQLSERVER;persist security info=False;initial catalog=pubs")

adr =

New SqlDataAdapter("select * from empjs", con)

ds =

New DataSet

adr.Fill(ds)

xmldoc =

New XmlDataDocument(ds)

xmldoc.Save(System.AppDomain.CurrentDomain.BaseDirectory() + "/Data/emp24.xml")

End If

End Sub
1.Retrieving from database.
2.convert it inot xml document .
3.it will be stored in a folder which is named as Data.
 
i have downloaded this emp24.xml using javascript .
 
my Question is ...
 
when i my application runs in client pc...
 
will this emp24.xml resides physically client pc or not??

 

with Regards,

BabuLives

unread,
Oct 24, 2005, 5:42:40 AM10/24/05
to .NetIndia
just give the Jscript code u r using for downloading the xml file from
server..


Regards,
Satheesh

Ravi

unread,
Oct 24, 2005, 5:55:22 AM10/24/05
to Techdot...@googlegroups.com
Yes it will available

sathiya subramanian

unread,
Oct 24, 2005, 5:53:53 AM10/24/05
to Techdot...@googlegroups.com
Dear Satheesh,
 
I have parse through the XML document and i got the contents from it.
 
But my Question is that WILL that XML FILE RESIDES PHYSICALLY IN CLIENT PC OR NOT.
 
with regards,
sathiyajs

 

Ravi

unread,
Oct 24, 2005, 6:07:14 AM10/24/05
to Techdot...@googlegroups.com
Hi sathiyajs
The XML file will resides in the server machine not in client machine
ok

BabuLives

unread,
Oct 24, 2005, 6:00:00 AM10/24/05
to .NetIndia
it will be inside the bin folder of ur application in ur webserver
ie..here...
(System.AppDomain.CurrentDomain.BaseDirectory() +
"/Data/emp24.xml")

U r just opening and parsing na!!!(Without saving to any URL in
Jscript)...the it wont reside in client machine..

Regards,
Satheesh

sathiya subramanian

unread,
Oct 24, 2005, 6:00:10 AM10/24/05
to Techdot...@googlegroups.com
Hi Ravi,
Thanks Yaar for ur answer.

sathiya subramanian

unread,
Oct 24, 2005, 6:04:00 AM10/24/05
to Techdot...@googlegroups.com
Dear Satheesh,
Thanks Yaar for ur answer
 
with regards,
sathiyajs

 
Reply all
Reply to author
Forward
0 new messages