Open jolmg opened 5 years ago
For this example XML:
<x can="pal"> <y baz="car" foo="bar"> </y> </x>
Using any kind of predicate when matching attributes, results in all attributes:
ghci> :m + Text.XML.HXT.Parser.XmlParsec ghci> :m + Text.XML.HXT.XPath ghci> let xtrees = xread "<x can=\"pal\"><y baz=\"car\" foo=\"bar\"></y></x>" ghci> length $ concat $ fmap (getXPath "//@*[name() = 'foo']") xtrees 3 ghci> length $ concat $ fmap (getXPath "//@*[name() = 'can']") xtrees 3 ghci> length $ concat $ fmap (getXPath "//@*[false()]") xtrees 3
Versions:
For this example XML:
Using any kind of predicate when matching attributes, results in all attributes:
Versions: