Hi,
I am trying to get the value of child from
xmlstr = """<p:root xmlns:p="http://tempuri.org/string"><p:chil d
DataType="Strin g">Hellpppp</p:child></p:root>"""
using
doc=parseString (xmlstr)
nodeList = xml.xpath.Evalu ate("/p:root/p:child/text()", doc)
and am getting the following exception:
xml.xpath.Runti meException: Undefined namespace prefix: "p".
I am using python 2.2.2 with PyXML 0.8
I think my usage of the Evaluate is wrong or incomplete. I have tried
to google for information but to no avail. Can anyone please shed
light on this.
Thanks
Bipin
I am trying to get the value of child from
xmlstr = """<p:root xmlns:p="http://tempuri.org/string"><p:chil d
DataType="Strin g">Hellpppp</p:child></p:root>"""
using
doc=parseString (xmlstr)
nodeList = xml.xpath.Evalu ate("/p:root/p:child/text()", doc)
and am getting the following exception:
xml.xpath.Runti meException: Undefined namespace prefix: "p".
I am using python 2.2.2 with PyXML 0.8
I think my usage of the Evaluate is wrong or incomplete. I have tried
to google for information but to no avail. Can anyone please shed
light on this.
Thanks
Bipin
Comment