in reply to Re: XML::Twig parsing poorly structured content
in thread XML::Twig parsing poorly structured content
Looks very nice, thank you! and it works, at least for my sample XML.
I'm not familiar with this handler construction:
'div[@class="event"]'It looks rather XSL-ish. Is there some explanation of how that works? The reason I ask (sheepishly) is that my pseudo XML is simpler than the real stuff, meaning it has sub-levels that I want to parse, e.g.:
<h3 class="current-day">Thursday, February 2</h3> <div class="event"> <div class="title">Event 1</div> <span class="time">7:30pm</span> <span class="location">Main Street</span> </div> <div class="event"> <div class="title">Event 2</div> <span class="time">9pm</span> <span class="location">Green Street</span> </div>
Sorry not to be more detailed in my original post. Much appreciated.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: XML::Twig parsing poorly structured content
by choroba (Cardinal) on Jan 25, 2017 at 08:26 UTC | |
|
Re^3: XML::Twig parsing poorly structured content
by kcott (Archbishop) on Jan 25, 2017 at 08:21 UTC | |
by slugger415 (Monk) on Jan 25, 2017 at 16:08 UTC |