Hi
I have an XML file, for simplicity we'll say:
<?xml version="1.0" encoding="ISO-8859-1"?>
<entry id="0">
<date_start>01/01/99</date_start>
<date_end>01/01/99</date_end>
<sometext>hello world</some text>
</entry>
<entry id="1">
<date_start>01/01/00</date_start>
<date_end>01/01/00</date_end>
<sometext>hello other world</some text>
</entry>
If I parse the above as-is using:
$html = xslt_process($parser, 'myxmlfile.xml', 'myxslfile.xsl');
echo $html;
I will get the events in ascending order, ie: oldest first.
However I need to display them in descending order.
I have two options - firstly reorder the entries within the xml file itself (which I would rather not do), or secondly leave the file as-is but process the xml in such a way that event 1 is displayed before event 0.
Please can anyone help me to achieve the latter.
Many thanks
-Colin
I have an XML file, for simplicity we'll say:
<?xml version="1.0" encoding="ISO-8859-1"?>
<entry id="0">
<date_start>01/01/99</date_start>
<date_end>01/01/99</date_end>
<sometext>hello world</some text>
</entry>
<entry id="1">
<date_start>01/01/00</date_start>
<date_end>01/01/00</date_end>
<sometext>hello other world</some text>
</entry>
If I parse the above as-is using:
$html = xslt_process($parser, 'myxmlfile.xml', 'myxslfile.xsl');
echo $html;
I will get the events in ascending order, ie: oldest first.
However I need to display them in descending order.
I have two options - firstly reorder the entries within the xml file itself (which I would rather not do), or secondly leave the file as-is but process the xml in such a way that event 1 is displayed before event 0.
Please can anyone help me to achieve the latter.
Many thanks
-Colin