Click to See Complete Forum and Search --> : Filter xml in html


ricardoduarte
02-23-2005, 02:20 PM
Hello,

I am a newbie in this type of language (xml)... and have some doubts that are making me crazy.. I have a xml file with data that I intend to show in an HTML page.
That i can do :)

The problem is that i need a small filtering...

Here is a part of the html (the data I get from a xml file) :

<tr>
<td align="left" width="100"><span datafld="Company"></span></td>
<td align="left" width="100"><span datafld="Product"></span></td>
<td align="left" width="100"><span datafld="Amount"></span></td>
</tr>

What I need is simply to filter the field “company” and showing only the data for this each “company” in a html table. The goal is to make a table for each company... and put a header on each table with the “company” .

At this moment it appears:

(Not formatted)

microsoft, windows, 2
microsoft, office, 3
microsoft, exchange, 2
Linux, redhat, 2
Linux, mandrake, 1

I want:

Microsoft
windows, 2
office, 3

Linux
redhat, 2
mandrake, 1

Is this possible without xls and other “crazy stuff” ?

Thanks in advance
From Portugal
Ricardo Duarte

Khalid Ali
02-23-2005, 03:23 PM
should be possible with JavaScript useage(since you don't want to use the other "carzy" stuff)
:-)

MstrBob
02-23-2005, 05:17 PM
Couldn't this be accomplished with your XLS? It would depend on the XML structure. Perhaps you should change the format of your XML file to reflect how you want to organize your data.

Khalid Ali
02-23-2005, 08:15 PM
Hey Bob he did mention explicitly without XSL/XSLT
:D

MstrBob
02-23-2005, 08:24 PM
Whoah.... my eyes are deceiving me, I thought he said "Is this possible with xls and other “crazy stuff” ?" Okay, forget what I just said then, sorry...

ricardoduarte
02-25-2005, 09:42 AM
Thanks a lot for all the help.

I resolved my problem with xsl...it’s not so “crazy” after all.

From Portugal
Ricardo Duarte