Link to home
Start Free TrialLog in
Avatar of bwh1te
bwh1te

asked on

XML XPathDocument

Hi,

I am getting some XML in from a web service in asp.net page.

The XML is in a string which I am loading into an xPathDocument.

To begin with I strip out the CDATA section usnig a REPLACE function call.
The resulting string will not work in an xPathDocument (I cannot navigate to anynodes) If however I take the floowing root element out of the string it does! It would seem to have something to do woth the namespaces - does anyone have any ideas??

<CTFschedule xmlns='http://www.govtalk.gov.uk/taxation/CTF' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.govtalk.gov.uk/taxation/CTF CTFschedule-v1-2.xsd'>
ASKER CERTIFIED SOLUTION
Avatar of mrwebdev
mrwebdev

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of bwh1te
bwh1te

ASKER

Thanks for taking the time (I was hoping to only award you 100 for your effort but I could only give the whole lot)
The link you show is using the creatObject (associated with classic asp not asp.net)

Apparently the xPathDocument does not accept namespaces???????? This was why it was failing!

Thank you very much!