I want to use some kind of XML filtering, using javascript w/ jQuery. I’m not very familiar with xslt yet. I’ve seen that there’s always a XML document and a certain style (XSL) for that document. Then, the result is rendered in XHTML. I really just want to grab some XML, filter (by node name, some attribute, etc) and generate a (filtered/smaller) version of that xml. Do you think the xslt approach is the simplest ?
Thanks in advance
XSLT is a language that has been especially designed for transformation of tree-structured input. This is why it is probably the best and simplest for implementing such tasks.
Here is an example:
We want to produce from this XML document another document that has the same structure and element name/content, but contains only those
numelements from the original document, whose valu is multiple of 3.Here is the transformation to accomplish this: