M
martijn
H!,
Is it possible to get a <tag:id>value</tag:id> value ?
When I do this:
-----------------------------------------------------
theXML = """<?xml version="1.0"?>
<title>The Fascist Menace</title>
"""
import xml.dom.minidom as dom
doc = dom.parseString(theXML)
print doc.getElementsByTagName('title')[0].toxml()
I get : <title>The Fascist Menace</title> thats oke for me
-----------------------------------------------------
But the xmlfile I must read have other tags:
theXML = """<?xml version="1.0"?>
<title:id>The Fascist Menace</title:id>
<title:name>bla la etc</title:name>
"""
how to get that values ?
I try things like:
print doc.getElementsByTagName('title:id')[0].toxml() <--error
Thanks,
GC-Martijn
Is it possible to get a <tag:id>value</tag:id> value ?
When I do this:
-----------------------------------------------------
theXML = """<?xml version="1.0"?>
<title>The Fascist Menace</title>
"""
import xml.dom.minidom as dom
doc = dom.parseString(theXML)
print doc.getElementsByTagName('title')[0].toxml()
I get : <title>The Fascist Menace</title> thats oke for me
-----------------------------------------------------
But the xmlfile I must read have other tags:
theXML = """<?xml version="1.0"?>
<title:id>The Fascist Menace</title:id>
<title:name>bla la etc</title:name>
"""
how to get that values ?
I try things like:
print doc.getElementsByTagName('title:id')[0].toxml() <--error
Thanks,
GC-Martijn