473,396 Members | 1,843 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 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 4525
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.