in reply to searching the XML file for certain nodes

Use an XPATH expression. (Or XQUERY if you want to go over the top.) What Perl module do you use?

  • Comment on Re: searching the XML file for certain nodes

Replies are listed 'Best First'.
Re^2: searching the XML file for certain nodes
by Anonymous Monk on Mar 10, 2009 at 14:03 UTC
    I've used XPATH before but just for extracting info from xml file. how shall i state this in perl :
    doc("file.xml")/e/p[V="YES"]
      I've used XPATH before but just for extracting info from xml file

      Well that's what you want don't you? See post of ramrod below for the xpath syntax. If you want to transform your XML document into another one then this cries out for XSLT (in which case you also use xpath expressions:).