?
Solved

XML XPathDocument

Posted on 2004-11-09
3
Medium Priority
?
300 Views
Last Modified: 2008-02-26
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'>
0
Comment
Question by:bwh1te
  • 2
3 Comments
 
LVL 6

Accepted Solution

by:
mrwebdev earned 1000 total points
ID: 12535351
Look here, maybe this can help your situation, Good Luck!
http://www.experts-exchange.com/Web/Q_21190189.html

Let me know, Thanks!
0
 
LVL 1

Author Comment

by:bwh1te
ID: 12535541
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!

0
 
LVL 6

Expert Comment

by:mrwebdev
ID: 12535563
Thank you very much!
0

Featured Post

Prep for the ITIL® Foundation Certification Exam

December’s Course of the Month is now available! Enroll to learn ITIL® Foundation best practices for delivering IT services effectively and efficiently.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Although a lot of people devote their energy toward marketing for specific industries, there are some basic principles that can be applied to any sector imaginable. We’ll look at four steps to take and examine how those steps were put into action fo…
When it comes to security, close monitoring is a must. According to WhiteHat Security annual report, a substantial number of all web applications are vulnerable always. Monitis offers a new product - fully-featured Website security monitoring and pr…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.
Suggested Courses
Course of the Month15 days, 22 hours left to enroll

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question