Paul Le Sueur
2003-11-11 12:58:34 UTC
Dear All,
I have been trying to use XPath with the DOMDocument object and selectnodes
function, to query an XML document containing a default namespace. I have
seen other postings around this subject but have still not found one which
answers my specific issues.
When I try and query an XML document which does not contain a default
namespace I get no problems, the nodes I require are returned by the
selectnodes function.
When, however, I try and query an XML document with a default namespace, the
selectnodes function will not return anything.
I gather this problem is down to the need to specify a namespace against the
DOMdocument object when loading my XML document. While there are plenty of
resources specifying how to do this with VB.Net, I can't find any references
that tell me how to do this with VB6 or VBScript (I need to use these as I am
writing code for a Microsoft InfoPath form, which uses script)
Any advice would be appreciated!
Thank you,
Paul.
I have been trying to use XPath with the DOMDocument object and selectnodes
function, to query an XML document containing a default namespace. I have
seen other postings around this subject but have still not found one which
answers my specific issues.
When I try and query an XML document which does not contain a default
namespace I get no problems, the nodes I require are returned by the
selectnodes function.
When, however, I try and query an XML document with a default namespace, the
selectnodes function will not return anything.
I gather this problem is down to the need to specify a namespace against the
DOMdocument object when loading my XML document. While there are plenty of
resources specifying how to do this with VB.Net, I can't find any references
that tell me how to do this with VB6 or VBScript (I need to use these as I am
writing code for a Microsoft InfoPath form, which uses script)
Any advice would be appreciated!
Thank you,
Paul.