in reply to extract tag content from VLC webserver via XML::Rules

If really all you want is that one item and it is on one line of your XML file, use a regex:

/^\s*<info name="now_playing">(.*?)<\/info>$/

Replies are listed 'Best First'.
Re^2: extract tag content from VLC webserver via XML::Rules ( m{\Q\E}sx )
by Anonymous Monk on Jun 25, 2013 at 09:47 UTC

    If really all you want is that one item and it is on one line of your XML file, use a regex: /^\s*<info name="now_playing">(.*?)<\/info>$/

    If you're going to use a regex don't bother with anchors or or backslashes :)

    my( $fo ) = m{ \Q<info name="now_playing">\E (.*?) \Q</info>\E }sx;