in reply to Getting the XML node containing a search text...

give me the list of nodes in an XML doc that contain a search string
Can you be more specific regarding what you want to search? Are you trying to match only element names? Element text? Attribute names? Attribute values? All of the above?

You should post a tiny sample of your XML and the search string.

XML::Twig has xpath capabilities.

  • Comment on Re: Getting the XML node containing a search text...

Replies are listed 'Best First'.
Re^2: Getting the XML node containing a search text...
by biswanath_c (Beadle) on Oct 27, 2009 at 12:27 UTC

    given a string, I would want to search for all nodes in a an XML document that 'contain' the search string 'in' its value (not exact match). So, i want to search for nodes whose 'value' contain a given search string and would like to get the xpath of all such matching nodes.