Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.5.5
-
Fix Version/s: 1.6-rc-1, 1.5.8, 1.7-beta-1
-
Component/s: XML Processing
-
Labels:None
-
Number of attachments :
Description
I am trying to parse HTML with XmlParser (see example below).
I expect both expressions
html.body
and
html.":body"
will return the same value, since namespace prefix is empty.
But the first one does not work (it rerurns empty list).
Sorce code:
import groovy.xml.* def text = """ <html xmlns="http://www.w3.org/1999/xhtml"> <body> text </body> </html> """ def html = new XmlParser().parseText(text) println html.body println html.":body"
Result:
[]
[
body[attributes={}; value=[text]]]
add code tags