Mar 17, 2013 xmllint -xpath //element/@attribute filename.xml returns attribute = 'value'. Xmllint -xpath 'string (//element/@attribute)' filename.xml returns what I want, but only for the first match. For another solution almost satisfying the question, here is an XSLT that can be used to evaluate arbitrary XPath expressions (requires dyn:evaluate. Xpath generator. Insert your xml in to the big field. To generate an xpath. Place the cursor in the text, attribute or element you want an xpath to. XPath, the XML Path Language, is a query language for selecting nodes from an XML document. In addition, XPath may be used to compute values (e.g., strings, numbers, or Boolean values) from the content of an XML document. XPath was defined by the World Wide Web Consortium (W3C). XMLQuire's XPath Editor has auto-complete, tracing, syntax-coloring, dynamic-evaluation features at its core. Blended with a fully-featured XML Editor, a compelling new XPath test and development environment is now offered, building on our orginalSketchPathtool.
EditiX is a powerful and easy to use XML editor, Visual Schema Editor, XQuery Editor andXSLT debugger for Windows, Linux and Mac OS X designed to help web authors and application programmers take advantage of the latest XML and XML-related technologies such as XSLT / FO, DocBook and XSD Schema. EditiX provides users with an extensive range of XML functionality within a refined IDE that guides you with intelligent entry helpers. EditiX has realtime XPath location and syntax error detection. Helpers are also provided with context syntax popup supporting DTD, Schema and RelaxNG. EditiX supports multiple templates and project management. User can apply XSLT, XQuery or FO Transformation and show the result with a dedicated view. All the process can be managed by shortcuts. Working locally is managed with OASIS XML Catalogs. EditiX includes default templates with XML, DTD, XHTML, XSLT, XSD, XML RelaxNG, SVG, MathML and XML FO.
EditiX XML Editor now comes in two editions. EditiX Free XMLEditor Lite is free for non-commercial environments and can be downloaded without registration here