By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
448,691 Members | 1,143 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 448,691 IT Pros & Developers. It's quick & easy.

Reading a xml file and write it to a text file

P: 9
Hi folks
I want to read a xml file and then write the contents to a text file
Feb 26 '07 #1
Share this Question
Share on Google+
23 Replies


dorinbogdan
Expert 100+
P: 839
Using what language? Java, C#, VB?
Feb 26 '07 #2

P: 9
Using what language? Java, C#, VB?

using java
Feb 26 '07 #3

dorinbogdan
Expert 100+
P: 839
For reading an XML see this article.
To write a text file, see this article.
Feb 26 '07 #4

dorinbogdan
Expert 100+
P: 839
Or, can use this simpler method to write to text file.
Feb 26 '07 #5

P: 9
Or, can use this simpler method to write to text file.

Thanks a lot..
Feb 28 '07 #6

dorinbogdan
Expert 100+
P: 839
I understand that you found the answer.
So, I'll close the thread.
Mar 21 '07 #7

dorinbogdan
Expert 100+
P: 839
I re-open the thread in order to allow further comments or suggestions from other members or experts, as per adim request.
Mar 22 '07 #8

P: 4
Hello,
I am looking for the opposite function - read/open a text file and write/save to an XML with php. Anyone have any info on how to do this? thanks

- abtet -
Mar 27 '07 #9

P: 30
Welcome!

See these links:

PHP - File Read, Working With Text Files in PHP
and
Reading and writing the XML DOM with PHP
Hello,
I am looking for the function - read/open a text file and write/save to an XML with javascript. Anyone have any info on how to do this? thanks

snitu
Apr 10 '07 #11

dorinbogdan
Expert 100+
P: 839
Client-side JavaScript does *not* have access to the
client file system. ActiveX, under certain conditions (relaxed security
environment) has access to the client file system (using FileSystemObject for IExplorer only).
The same thing applies to XML files. Regularly, you cannot save them on client.

The best solution would be to handle the files on server, using XMLDOM object like this example.
Apr 10 '07 #12

P: 30
Client-side JavaScript does *not* have access to the
client file system. ActiveX, under certain conditions (relaxed security
environment) has access to the client file system (using FileSystemObject for IExplorer only).
The same thing applies to XML files. Regularly, you cannot save them on client.

The best solution would be to handle the files on server, using XMLDOM object like this example.

Thank you.

I have seen this code .
can u give me some other link for this question.
Then it is good to me to understanding.
Apr 10 '07 #13

dorinbogdan
Expert 100+
P: 839
I'm not sure what is your requirement, please give more details about this.
Do you need that server-script written in Javascript, instead of ASP?
Apr 10 '07 #14

P: 30
I'm not sure what is your requirement, please give more details about this.
Do you need that server-script written in Javascript, instead of ASP?

Yes
I need that server-script written in Javascript?
Apr 10 '07 #15

dorinbogdan
Expert 100+
P: 839
Yes
I need that server-script written in Javascript?
Is this a question or answer to my previous question?
Apr 10 '07 #16

dorinbogdan
Expert 100+
P: 839
You must use an asp file starting with
Expand|Select|Wrap|Line Numbers
  1. <%@ LANGUAGE="JavaScript" %>
Then just update that code to use JavaScript intead of VBScript.

Please let me know if you need any syntax help.
Apr 10 '07 #17

P: 30
Is this a question or answer to my previous question?

hi
sorry for late reply.
i am giving you answer of your previous question.
Apr 11 '07 #18

P: 30
hi
sorry for late reply.
i am giving you answer of your previous question.


hi
And in your second reply i am not getting.


Thanks
Apr 11 '07 #19

P: 1
I want it in C# way of parsing XML file and writing it to in text file.......
Apr 16 '07 #20

dorinbogdan
Expert 100+
P: 839
I want it in C# way of parsing XML file and writing it to in text file.......
Welcome!

Use XMLDocument to read XML files, like this article.
And one method to write text files here.
Apr 16 '07 #21

P: 3
Hi,
I am loading a xml file using javascript in Pocket Internet Explorer for local HTML file. I am not able to save the xml file back to the PPC device.
Expand|Select|Wrap|Line Numbers
  1. foodXML = new ActiveXObject("Msxml2.DOMDocument"); 
  2. newElement = foodXML.createElement(textstr); 
  3. foodXML.appendChild(newElement); 
  4. foodXML.save("test.xml");
Please help me to save xml file to local folder using javascript.
Thanks
Jaikant
Jan 8 '08 #22

P: n/a
how to read a xml file and write it in to a html file using c#
Oct 15 '10 #23

Frinavale
Expert Mod 5K+
P: 9,731
Jack,

Please refer to your thread posted here for more help on this topic.
Oct 15 '10 #24

Post your reply

Sign in to post your reply or Sign up for a free account.