Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

xml -> txt 1

Status
Not open for further replies.

zekmek

Programmer
Joined
Jun 12, 2003
Messages
44
Location
PT
Hello everybody,

I'm new with everything that concerns xml, xsl, xslt ...

Here is what i would like to do:
I have an xml file, i would like to generate from this file a text (.txt) file.

Is it possible ? has anyone got an example ? is there a tutorial somewhere ?

i have looked a little bit on the Internet and have found out that it could be possible with xslt maybe ... but i have no idea how i could do.

Thank you for your help.

 
Sure, you can create a text file using XSLT. If you want to create an actual "file", the easiest tool to use is a command line parser like Saxon ( or MSXSL
(
Your style sheet will start something like this:

<xsl:stylesheet xmlns:xsl=&quot; version=&quot;1.0&quot;>
<xsl:output method=&quot;text&quot;/>

You'll need to fill in the details. Here's a place to start:


If you wanted to create a tab delineated list, you could use the & #9; (tab) and & #13; (carriage return) [there should be no space between the & and #]. You can just output &quot;text&quot; also.

See how far you get and then come back if you get stuck.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top