Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > XML -> XSL conversion problem " for-each"

Reply
Thread Tools

XML -> XSL conversion problem " for-each"

 
 
Spam sucks
Guest
Posts: n/a
 
      06-04-2004
hello,

i create a logging xml file with dom that could have an unknown count of
results now it is 0 to 7 but it could be i have 14 or 50 results how can you
read this out with xsl, with php you would put it in an array or something
but now i want to do it with xsl.

in php it woul be like:
foreach ($array as $key=>$value)
{
echo "$key - $value <br />";
}

i can change the xml so if you could give me some pointers it would be
great.

Thanks in advance

<sockets>
<socket ID="334433" tijd="1086361564" type="">
<result>
<results ID="0"><![CDATA[Connectie]]></results>
<results ID="1"><![CDATA[msg=90;Name=R!M - RX_COMM~~~~]]></results>
<results ID="2"><![CDATA[Msg=90;Name=system;Data=WEB~~~~]]></results>
<results ID="3"><![CDATA[msg=0~~~~]]></results>
<results ID="4"><![CDATA[Msg=50~~~~]]></results>
<results ID="5"><![CDATA[msg=501;Result=Success;Count=1~~~~]]></results>
<results ID="6"><![CDATA[Msg=99~~~~]]></results>
<results ID="7"><![CDATA[system connection is closed]]></results>
</result>
</socket>
</sockets>


 
Reply With Quote
 
 
 
 
Spam sucks
Guest
Posts: n/a
 
      06-04-2004
already found it sorry !!

"Spam sucks" <nomail> schreef in bericht
news:40c091d1$0$34762$...
> hello,
>
> i create a logging xml file with dom that could have an unknown count of
> results now it is 0 to 7 but it could be i have 14 or 50 results how can

you
> read this out with xsl, with php you would put it in an array or something
> but now i want to do it with xsl.
>
> in php it woul be like:
> foreach ($array as $key=>$value)
> {
> echo "$key - $value <br />";
> }
>
> i can change the xml so if you could give me some pointers it would be
> great.
>
> Thanks in advance
>
> <sockets>
> <socket ID="334433" tijd="1086361564" type="">
> <result>
> <results ID="0"><![CDATA[Connectie]]></results>
> <results ID="1"><![CDATA[msg=90;Name=R!M - RX_COMM~~~~]]></results>
> <results ID="2"><![CDATA[Msg=90;Name=system;Data=WEB~~~~]]></results>
> <results ID="3"><![CDATA[msg=0~~~~]]></results>
> <results ID="4"><![CDATA[Msg=50~~~~]]></results>
> <results

ID="5"><![CDATA[msg=501;Result=Success;Count=1~~~~]]></results>
> <results ID="6"><![CDATA[Msg=99~~~~]]></results>
> <results ID="7"><![CDATA[system connection is closed]]></results>
> </result>
> </socket>
> </sockets>
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

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 Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
XML to XML Filtering using XSL Problem generalr XML 0 04-20-2010 07:58 PM
[Announce] Stylus Studio 2007 XML Enterprise Suite Released: XML Pipeline, XML Publishing and Data Conversion API's stylusstudio@gmail.com Java 0 09-26-2006 05:04 PM
[ANN] Stylus Studio 2007 XML Enterprise Suite Released: XML Pipeline, XML Publishing and Data Conversion API's Stylus Studio XML 0 09-26-2006 04:49 PM
XSL Question tp xsl:for-each and xsl:variable schaf@2wire.ch XML 1 05-27-2005 09:25 PM
simple(?) xml/xsl problem with xml from sql query dSchwartz XML 1 03-06-2004 02:06 AM



Advertisments