-
April 14th, 2015, 09:28 AM
#1
.xml to .txt
This is how my .xml page looks in a web browser. Is there a way to transform my .xml file into .txt file so that the text file would look like this?
Last edited by flex567; April 14th, 2015 at 09:30 AM.
-
April 14th, 2015, 09:36 AM
#2
Re: .xml to .txt
An XML document is essentially already "text" though, so I am not sure what you are asking.
-
April 14th, 2015, 09:44 AM
#3
Re: .xml to .txt
An XML document is essentially already "text" though, so I am not sure what you are asking.
I am not saying that .xml is not text.
-
April 14th, 2015, 09:47 AM
#4
Re: .xml to .txt
So what are you saying? Sorry, but the image you linked to is too blurred for me to make out what you are trying to do.
-
April 14th, 2015, 09:50 AM
#5
Re: .xml to .txt
click on the image and it will show the image in bigger size
-
April 14th, 2015, 09:55 AM
#6
Re: .xml to .txt
I'm not sure what you'd expect to get out of the file either. What would you expect that file to look like as a ".txt" file?
-
April 14th, 2015, 10:02 AM
#7
Re: .xml to .txt
I would like the .txt to look like this.
[img=http://s23.postimg.org/9qq9vj4fr/image.jpg]
I'm not sure what you'd expect to get out of the file either. What would you expect that file to look like as a ".txt" file?
It would be easier to parse the file, I could use the getline() function for example.
Last edited by flex567; April 14th, 2015 at 10:13 AM.
-
April 14th, 2015, 10:03 AM
#8
Re: .xml to .txt
Why don't you just use an existing XML parser library?
-
April 14th, 2015, 10:04 AM
#9
-
April 14th, 2015, 10:04 AM
#10
Re: .xml to .txt
If you want help, you'll need to explain yourself. How is your txt file different from your xml file?
-
April 14th, 2015, 10:13 AM
#11
Re: .xml to .txt
I don't have any text file. There is just the .xml file. I would like to create the text file from the .xml that would look like this:
-
April 14th, 2015, 10:19 AM
#12
Re: .xml to .txt
Okay, if I get this right: you have an XML document that you find hard to parse with getline. You want to transform it into a ".txt file" that is essentially the XML document formatted nicely for you to parse with getline to extract tag by tag and element by element. You only want to use standard library facilities. If so, this is a chicken and egg scenario: you cannot have your program format the XML document without reading and parsing it, but if your program can read and parse it, then you don't need it formatted nicely for reading.
-
April 14th, 2015, 10:24 AM
#13
Re: .xml to .txt
Originally Posted by flex567
I don't have any text file. There is just the .xml file. I would like to create the text file from the .xml that would look like this:
You're not making this easy. What is different between the two files?
-
April 14th, 2015, 10:27 AM
#14
Re: .xml to .txt
It would be easier to parse it. I could you getline function for example. I already manage to create a .txt file, it took me 10 min to manually select it all.
-
April 14th, 2015, 10:31 AM
#15
Re: .xml to .txt
Post the contents of both example files here in [code][/code] bbcode tags and explain what exactly is the difference between them. Note that "easier to parse" it is not a difference that matters to us: what matters is what it is about the format that makes one "easier to parse" according to you.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|