473,662 Members | 2,593 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

using XPathNodeIterat or

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 XPathNodeIterat or cuts out the embedded html
tags.

How can I, using an XPathNodeIterat or, 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>Wec lome to <b>my website</b></h3></head-section>
<foot-section>If you need support please visit the <a
href="support.h tm">support</a> page.</foot-section>
</default-page>
</page>
Nov 12 '05 #1
2 4548
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 XPathNodeIterat or cuts out the embedded html
tags.

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


You can use XPathNavigatorR eader 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!tkachen ko.com> wrote in
message news:OW******** ******@TK2MSFTN GP15.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 XPathNodeIterat or cuts out the embedded html tags.

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


You can use XPathNavigatorR eader 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
8403
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 through a NodeList (e.g.: foreach XmlNode in XmlNodeList ... ) 2. or use an XPathNodeIterator Are there any differences in performance? Are both used for different
2
3586
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 Book1Book2Book3Book4.. as I understand, func method is called only once and XPathNodeIterator.MoveNext() is called only once..and how is this concatenated output?? tia, avnrao.
0
392
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 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?
2
1482
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 trying to extract. ... XPathNavigator navigator = xmlDoc.CreateNavigator(); // xpathQuery = "/ProductInformation/ProductNumber" XPathExpression expr = navigator.Compile( xpathQuery );
6
15504
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
5317
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
1646
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> including <PP1> <PP2> <PP3> then separately extract the next instance of <PP> <PP1> <PP2> <PP3>. Does anyone have any examples on how to do this ??? Im trying to create an html table using these values but its a bit of a nightmare. any help appreciated
2
2516
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 follow: "Objects of type 'Script2' do not have such a member" The above error only happens when I set the XsltSettings.TrustedXslt ans use the following statement to load xsl file:
6
7689
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 using an XPathNodeIterator? Or should I be using something else? In the sample that follows: 1. Grab all "Page" nodes. 2. Loop through all the nodes.
0
8344
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8857
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8764
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8546
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8633
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7367
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6186
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
2
1993
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1752
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.