472,807 Members | 2,450 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,807 software developers and data experts.

using XPathNodeIterator

Hi,

I am writing an ASP.NET web applications which uses an xml file to display
html content on the web pages. My problem is that using the Value property
of the current object of the XPathNodeIterator cuts out the embedded html
tags.

How can I, using an XPathNodeIterator, output the entire contents of a node
even if it has child nodes?
A cut-down version of the xml file looks something like this:

<page>
<default-page>
<head-section><h3>Weclome to <b>my website</b></h3></head-section>
<foot-section>If you need support please visit the <a
href="support.htm">support</a> page.</foot-section>
</default-page>
</page>
Nov 12 '05 #1
2 4489
Emmanuel wrote:
I am writing an ASP.NET web applications which uses an xml file to display
html content on the web pages. My problem is that using the Value property
of the current object of the XPathNodeIterator cuts out the embedded html
tags.

How can I, using an XPathNodeIterator, output the entire contents of a node
even if it has child nodes?


You can use XPathNavigatorReader class to read OuterXml of the
XPathNavigator, see
http://weblogs.asp.net/cazzu/archive...19/115966.aspx

--
Oleg Tkachenko [XML MVP]
http://blog.tkachenko.com
Nov 12 '05 #2
Thanks! you saved my day!
"Oleg Tkachenko [MVP]" <oleg@no_!spam!_please!tkachenko.com> wrote in
message news:OW**************@TK2MSFTNGP15.phx.gbl...
Emmanuel wrote:
I am writing an ASP.NET web applications which uses an xml file to display html content on the web pages. My problem is that using the Value property of the current object of the XPathNodeIterator cuts out the embedded html tags.

How can I, using an XPathNodeIterator, output the entire contents of a node even if it has child nodes?


You can use XPathNavigatorReader class to read OuterXml of the
XPathNavigator, see
http://weblogs.asp.net/cazzu/archive...19/115966.aspx

--
Oleg Tkachenko [XML MVP]
http://blog.tkachenko.com

Nov 12 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: panik | last post by:
Hi, say I have an xml file with an X number of nodes I want to loop through (to, for example, display each node as a HyperLink in an asp.net webpage). Which of both is best practice: 1. Loop...
2
by: avnrao via .NET 247 | last post by:
Hi, please clarify this doubt about XPathNodeIterator..the following XSLT uses this.. my doubt is, by looking at the XSLT, i thought the output to be Book1..but the actual output is...
0
by: Emmanuel | last post by:
Hi, I am writing an ASP.NET web applications which uses an xml file to display html content on the web pages. My problem is that using the Value property of the current object of the...
2
by: orange | last post by:
Hello, I have been trying to get data from an xml file with a namespace. I have followed the example in the MSDN, but I get no data in t he XPathNodeIterator, but the file has the data I am...
6
by: Chua Wen Ching | last post by:
Hi there, I had this xml file with me (not yet consider implementing xml namespaces yet). <?xml version='1.0'?> <Object> <Windows> <EID>1</EID> <EDesc>Error 1</EDesc> </Windows>
3
by: KJ | last post by:
It is true that there is no way to get the outerXml of XPathNodeIterator.Current? Please say it isn't so.
1
by: csgraham74 | last post by:
Hi Guys, I want to populate a nodelist so that i can extract various details. The xml document i have is similar to the one below. baiscally i want to extract the first instance of <PP>...
2
by: Jon | last post by:
Hi, I am testing the scenario to migrate from MSMXL4 to .NET2.0 system.xml. I experienced xsl file loading problem whenever the xsl file have a user defined script in it. The error message is as...
6
by: Kindler Chase | last post by:
I'm trying to iterate through a set of nodes and then edit/delete specific attributes using XPathNodeIterator. Adding attributes is no problem. My first question is how do I delete an attribute...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 2 August 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
linyimin
by: linyimin | last post by:
Spring Startup Analyzer generates an interactive Spring application startup report that lets you understand what contributes to the application startup time and helps to optimize it. Support for...
0
by: kcodez | last post by:
As a H5 game development enthusiast, I recently wrote a very interesting little game - Toy Claw ((http://claw.kjeek.com/))。Here I will summarize and share the development experience here, and hope it...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Sept 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
14
DJRhino1175
by: DJRhino1175 | last post by:
When I run this code I get an error, its Run-time error# 424 Object required...This is my first attempt at doing something like this. I test the entire code and it worked until I added this - If...
5
by: DJRhino | last post by:
Private Sub CboDrawingID_BeforeUpdate(Cancel As Integer) If = 310029923 Or 310030138 Or 310030152 Or 310030346 Or 310030348 Or _ 310030356 Or 310030359 Or 310030362 Or...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
0
by: lllomh | last post by:
How does React native implement an English player?
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.