Click to See Complete Forum and Search --> : convert xml to single row


pelegk1
05-07-2007, 12:00 PM
how can i take an xml and using xslt converting it to a single row for example
<xml>
<a>ddd</a>
</xml>

to
<xml><a>ddd</a></xml>

thnaks in advance
peleg

Charles
05-07-2007, 12:11 PM
<?xml version="1.0" encoding="ISO-8859-1"?>

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:output method="xml" encoding="utf-8"/>

<xsl:strip-space elements="*"/>

<!--

Free Vannunu

-->

<xsl:template match="*|@*">
<xsl:copy>
<xsl:apply-templates select="@*"/>
<xsl:apply-templates/>
</xsl:copy>
</xsl:template>

</xsl:stylesheet>

pelegk1
05-07-2007, 02:51 PM
he is already free!
its just in your mind he isnt :p

Charles
05-07-2007, 03:57 PM
Forgive me, I mistyped the name of a very great man and victim of the Israeli government.

http://www.vanunu.freeserve.co.uk/

pelegk1
05-08-2007, 09:12 AM
this is the xsl i currently got and i want to add your code under the <RAWDATA> - how do i do it?


<?xml version="1.0" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >
<xsl:output method = "xml" omit-xml-declaration = "yes" indent = "no"/>

<xsl:call-template name="Process" />

<xsl:template name="Process">
<Cdr>
<id>
456gfhfghgfh
</id>
<Reason></Reason>
<RawData>


</RawData>
</Cdr>
</xsl:template>
</xsl:stylesheet>


how can i add your code to recive the xml inside the RAWDATA as a raw?

thnaks in advance
peleg