I need to strip out xml tags from codes below and retrieve data between tags such as DSC_0003.jpg, Dragon at Choina town Gate, and so on with regular expression in perl.
I figured out how to get the data between tags if tags are on the same line but I am having trouble figuring out how to handle tags when they are on different lines such as comments tag in this case.
Any ideas???
<description>
<filename>DSC_0003.jpg</filename>
<title>Dragon at Chinatown Gate</title>
<location>San Francisco, California</location>
<comments>
A gloriously decorated gate marks the entry to Grant Avenue's
Chinatown. It was unveiled in 1970, and helped secure the street's
status as the neighborhood's center. Once you're past the gate,
you'll see elaborate 1920s streetlights sculpted to resemble golden
dragons lighting the way. Grant Avenue and Bush Street.
</comments>
</decription>