From: Steve B. <Ste...@zv...> - 2002-08-26 21:44:37
|
db...@hs... wrote: > I am using TclDOM to construct DOM tree for a document. Can someone > tell me how I can query the DOM tree based on attribute values of the nodes. Massive plug: This will be covered in the TclDOM tutorial at the upcoming Tcl Conference in Vancouver. So enrol in the tute, register for the conference and come to Vancouver! ==== selectNode accepts an XPath expression and returns a (static) list of nodes that match the expression. To learn about XPath, grab any good book on XSLT, such as Mike Kay's XSLT Programmer's Reference. With XPath, attributes may be selected using the attribute:: axis, or '@' for short. For example, //*/@href will select all attributes named 'href' in the document. HTHs, Steve Ball -- Steve Ball | XSLT Standard Library | Training & Seminars Zveno Pty Ltd | Web Tcl Complete | XML XSL Schemas http://www.zveno.com/ | TclXML TclDOM | Tcl, Web Development Ste...@zv... +---------------------------+--------------------- Ph. +61 2 6242 4099 | Mobile (0413) 594 462 | Fax +61 2 6242 4099 |