Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XML
|
XML General XML discussions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XML section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 12th, 2008, 01:40 PM
Registered User
 
Join Date: Jun 2008
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default XML Filtering

I have a problem in trying to filter the elements from a XML Document

basically I have an xml file that may contain

<list>
   <bookname> ..... </bookname>
   <type>
     <type1>....</type1>
     <type2>....</type2>
   </type>

and want to display elements that has the data in type2 for example... at the moment I have manage to display the each main elements in the xml document according to user specs but having trouble in filtering it according to different elements

should I be looking towards xpath ? and if so how is this implemented in javascript?



 
Old June 12th, 2008, 05:25 PM
mhkay's Avatar
Wrox Author
 
Join Date: Apr 2004
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts
Default

It's very simple to do this kind of thing with XSLT, either on the server or in the browser.

Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference





Similar Threads
Thread Thread Starter Forum Replies Last Post
Filtering XML data aldwinenriquez XSLT 7 August 25th, 2008 03:24 AM
Help with filtering xml jconroy XSLT 6 April 6th, 2008 11:33 PM
filtering xml in using XSLT venjamin XSLT 1 October 20th, 2006 04:21 AM
Filtering an xml with xslt Tomi XSLT 4 September 5th, 2006 06:29 AM
Filtering XML data based on differnt XML ahmed123 XSLT 5 August 11th, 2006 09:15 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.