473,396 Members | 2,085 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Reading a xml file and write it to a text file

Hi folks
I want to read a xml file and then write the contents to a text file
Feb 26 '07 #1
23 8238
dorinbogdan
839 Expert 512MB
Using what language? Java, C#, VB?
Feb 26 '07 #2
Using what language? Java, C#, VB?

using java
Feb 26 '07 #3
dorinbogdan
839 Expert 512MB
For reading an XML see this article.
To write a text file, see this article.
Feb 26 '07 #4
dorinbogdan
839 Expert 512MB
Or, can use this simpler method to write to text file.
Feb 26 '07 #5
Or, can use this simpler method to write to text file.

Thanks a lot..
Feb 28 '07 #6
dorinbogdan
839 Expert 512MB
I understand that you found the answer.
So, I'll close the thread.
Mar 21 '07 #7
dorinbogdan
839 Expert 512MB
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
abtet
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
snitu
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
839 Expert 512MB
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
snitu
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
839 Expert 512MB
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
snitu
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
839 Expert 512MB
Yes
I need that server-script written in Javascript?
Is this a question or answer to my previous question?
Apr 10 '07 #16
dorinbogdan
839 Expert 512MB
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
snitu
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
snitu
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
I want it in C# way of parsing XML file and writing it to in text file.......
Apr 16 '07 #20
dorinbogdan
839 Expert 512MB
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
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
how to read a xml file and write it in to a html file using c#
Oct 15 '10 #23
Frinavale
9,735 Expert Mod 8TB
Jack,

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

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

Similar topics

7
by: Santah | last post by:
hi I'm new to C++ and I'm currently working on Visual C++ 6.0 I'm trying to open a text file, and read some data from it part of the text file looks like this: --------
6
by: Foxy Kav | last post by:
Hi, another question from me again, i was just wondering if anyone could give me a quick example of reading data from a file then placing the data into an array for some manipulation then reading...
40
by: googler | last post by:
I'm trying to read from an input text file and print it out. I can do this by reading each character, but I want to implement it in a more efficient way. So I thought my program should read one...
11
by: Michael McGarry | last post by:
Hi, I am reading strings from a text file using fscanf("%s", currToken); This returns strings delimited by whitespace. How can I tell if the string was followed by a carriage return in the...
2
by: SteMc | last post by:
today I tackled, for the first time, opening and reading from a text file. Following the example on the MSDN and declared a variable, strline as a string and objstreamreader as a streamreader. ...
2
by: bienwell | last post by:
Hi all, Do you have any source code to import data from Excel file or text file into database in ASP.NET program ? Please give me your reference if you have. Thanks in advance
8
by: pappu | last post by:
Hello friends, I want to convert .xls file into text file.So can anybody pls help me out. Thxxxxxx, Sachin.
3
by: manigattani | last post by:
Please let me know of some java code for converting dbf file to text file
1
by: LakshmiE | last post by:
Hi, Can any one help me by providing me the VB code to convert binary file to text file. The extension of the binary file i have is ".ST5". This is not in the readable format. i want to read...
3
by: minhtran | last post by:
Hi all Anyone has any idea how to get a Excel header column in VB.NET. Please, help me. Thank you so much in advance
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.