Hi Uche and Luis Miguel,
I start a new thread instead continuing on the old one.
I have it resolved by changing my createXMLQuery to this:
def createXMLquery():
"""
Create a bindery instance, to be used for e.g. GWS vinoXML query"""
doc_header = """<query
xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance"
xmlns="
http://www.vinoxml.org/XMLschema"
xmlns:xsd="
http://www.w3.org/2001/XMLSchema"></query>"""
doc = xmlu.bindery.parse(doc_header)
return doc
That gives me the name spaces as Global Wine Stocks (GWS) wants/expects
them, so much easier/nicer then the "force_nsdecls".
Only "hick" is that I still need to remove 'xmlns=""' from the string:
docString = doc.xml_encode()
qs = docString.replace('xmlns=""', '')
Otherwise GWS gives me a "Query not well formed" error.
My question, is the GWS XML parser not standard compliant or ...?
Werner