Web Design and Development Forums

XML Transformation

This is a discussion on "XML Transformation" within the XML, RSS & Atom section. This forum, and the thread "XML Transformation are both part of the Program Your Website category.

Old Sep 6th, 2006, 23:24   #1 (permalink)
New Member
 
Join Date: Sep 2006
Location: Vienna
Age: 32
Posts: 1
Question XML Transformation

Hi experts,

imagine you have the following xml file which tags have to be changed into another structure. i.e. an xml file has to be transformed into another xml file using patricular tags. the output should be rendered containing the new xml-tags as an xml tree and neither as text nor as html???
how can this be done??

I would appreciate every mini tipp.......
thank you in advance!!!!
Markus



<invoice_rec>
<invoiceNum>102</invoiceNum>
<salesDate>30. Jul. 01</salesDate>
<shipToAddress>11 Hollsworth St</shipToAddress>
<shipToCity>Paramatta</shipToCity>
<shipToState>NSW</shipToState>
<shipToZip>2421</shipToZip>
<contactName>Sally</contactName>
<contactPhone>6789-4321</contactPhone>
<invoiceNum>102</invoiceNum>
<prodCode>FP006</prodCode>
<salesQty>34</salesQty>
<prodCode>FP006</prodCode>
<prodName>Flamingo Sunglasses</prodName>
<prodDesc>Pink sunglasses with mirrorred UP protected lenses</prodDesc>
<prodPrice>40.0000</prodPrice>
<supCode>s0004</supCode>
<supCode>s0004</supCode>
<supplierName>Northern Imports</supplierName>
<supplierAddress>87a Predition Lane</supplierAddress>
<supplierCity>Brisbane</supplierCity>
<supplierState>QLD</supplierState>
<supplierPhone>3452-5567</supplierPhone>
<supplierFax>3452-5568</supplierFax>
<supplierContact>Sandara</supplierContact>
<shipToState>NSW</shipToState>
</invoice_rec>

<xsl:stylesheet version="1.0" xmlnssl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" indent="yes"/>
<xsl:template match ="/">
<prod_rec>
<xsl:for-each select="//invoice_rec">
<xsl:sort order="ascending"/>
<prodCode><xsl:value-of select="prodCode"/></prodCode>
<prodName><xsl:value-of select="prodName"/></prodName>
<prodDesc><xsl:value-of select="prodDesc"/></prodDesc>
<prodPrice><xsl:value-of select="prodPrice"/></prodPrice>
<supCode><xsl:value-of select="supCode"/></supCode>
</xsl:for-each>
</prod_rec>
</xsl:template>
</xsl:stylesheet>
poornewbie is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
xml, transformation

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
CALS to HTML XSL Transformation RussellKay XML, RSS & Atom 0 Nov 2nd, 2006 10:10
3d transformation library Webforumz Staff Flash & Multimedia Forum 5 Oct 25th, 2003 09:19



Latest Updates

All Points SEO Security Advisory - CHECK YOUR SITE NOW!

Creative Coding :: February 2008

Webforumz is sponsored by: WESH UK Web Hosting
All times are GMT. The time now is 16:18.

Sleep Study Scoring :: Free Bet :: Website Templates :: Online Betting :: Bookmakers :: Funny Quotes :: Internet Recruitment Software :: Microsoft CRM Experts :: Online Casino :: Decorated Christmas Trees :: Midwife Forums :: Football Betting :: Ecommerce Software :: Web Hosting :: Football Stats :: Dry Cleaning Collection :: xtreme wales - extreme clothing :: Apuestas :: Sharepoint Consultants :: Website Optimisation :: Office Clearance London :: Sharepoint Experts :: Sports Betting :: Casino :: Website Templates :: Web Design Development India :: Online Gambling

Powered by: vBulletin Version 3.7, Copyright ©2000 - 2008, Jelsoft Enterprises Limited.
© 2003-2008 Webforumz.com : All Rights Reserved
Search Engine Friendly URLs by vBSEO 3.2.0 RC6


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59