BizTalk Utilities CV ,   Jobs ,   Code library
 
Home Page


Add/Edit your code items
Search the code library
Browse for the code library


SQL XML
Convert XDR to XML
Sort a table using the header of the table
Applying a XSLT stylesheet using the DBMS_XMLQuery package
N:N relationships with DBMS_XMLQuery Package
DBMS_XMLQuery package bind values to produce more than one xml file
Download data from a database in XML
Inserting XML file into a table using DBMS_XMLSave Package
Insert XML file into a table using ADO
How to call out to a COM component's method through XSLT
How to select DISTINCT items from XML via XSLT
How to convert Word (RTF) documents to XML for auto publication
Creating SQL Statements with XSLT
SQL straight to XML w/ transform
History Of XML
History Of XML And What Is XML.
Order Automation
You enjoy while you are away and let your machine do the job for you.
SQL Server 2000 User Defined Functions - A Powerful concept
XML/XSLT Maker
Generic ADO recordset to HTML table using XML / XSL


 
 

<< SEOSystem.XML >>


By Qing-Hua Jiang
First Posted 09/17/2001
Times viewed 339

How to transfer XML into a plain text file?


Summary This example shows a simple example of how to output your XML into a text using XSL, by comma separating the output.

The most common use for XML transformation is to convert XML into HTML file. The other 2 common uses are to convert XML into another format of XML file or into an text file.

I just finished up one E-biz project, which has to send a message to customer by Email. Some custoemr prefer the HTML format mail, and others like text format one better.So I had to use 2 XSL file to transfer the same XML data to different customers.

Here is one simple example that convert XML data to text file:

First specify output method: <xsl:output method=text/>, then seperate the item by limitator, such as ,, ; or . . Here I seperate them by comma, and at the end I use period instead. I also use <xsl:sort select=. order=descending/> to sort the items.

In order to view the text file in the browser, you have to view the source inside the browser.

See the XML & XSL file, and the following the results:

Comma separated and sorted list--All the books on my desk are:   
          XML Database, XML and VB 6.0, XML and SOAP Programming, XML, Oracle 8 Reference, Oracle 8 PL/SQL Programming, Javascript Reference, HTML 4, Dynamic HTML Reference, Database Access with Visual Basic 6, Active Server Page 3.0.

Additional information


Rate this article on a scale of 1 to 10 (0 votes, average 0)

Your vote :  

<< SEOSystem.XML >>





Leave a comment for this article
Your name
Your email (optional)
Your comment
Optional: Upload an attachment
Enter the code shown:

 
 

    Email TopXML