perl command extracting data from xml file?

  • Thread starter Thread starter ArnArn
  • Start date Start date
A

ArnArn

Guest
Sample data:
1. <title>INDICATIONS & DOSAGES</title><p><bold>DATA TO EXTRACT</bold></p><p>
2. <title>INDICATIONS & DOSAGES</title><p>Some text<bold>DATA TO EXTRACT</bold></p><p>
3. <title>INDICATIONS & DOSAGES</title><p>Some more text<bold>DATA TO EXTRACT</bold></p><p>

Problem:
hello i have a sample data above and i'm trying to extract data that is between <bold> fields. can someone please help on how to do this. i'm trying to use s/// or substring but it doesnt seem to work?
 
Hint #1: if you want to "extract", use the m// operator rather than the s/// operator.
Hint #2: if you want programming help, post the code you tried and we'll try to fix it for you.
Hint #3: do NOT bother posting Perl code unless it has "use strict; use warnings;" at the top.
 
Back
Top