473,705 Members | 2,539 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

USE of system.xml.xpat h


Hi Friends,
When we need the xpath namespace as we can traverse the xml document using xmldocument object like using selectSingleNod e or selectNodes methods. In system.xml.xpat h namespace we have to use XPathNavigator , XPathExpression , XPathNodeIterat or class to get the same result what we get it thru selectNodes ....and that too iterator can be traversed in forward direction only.

Please tell me the usage of system.xml.xpat h other than performance.

Enjoying XML.....

Alpha

---
Posted using Wimdows.net NntpNews Component - Posted from .NET's Largest Community Website: http://www.dotnetjunkies.com/newsgroups/
Nov 12 '05 #1
1 1772
alpha wrote:
Hi Friends, When we need the xpath namespace as we can traverse the
xml document using xmldocument object like using selectSingleNod e or
selectNodes methods. In system.xml.xpat h namespace we have to use
XPathNavigator , XPathExpression , XPathNodeIterat or class to get the
same result what we get it thru selectNodes ....and that too iterator
can be traversed in forward direction only.

Please tell me the usage of system.xml.xpat h other than performance.


Hehe, as a matter of interest, SelectNodes is just a wrapper around
XPathNavigator :)
XPathNavigator allows more advanced things to be done, say caching
compiled XPath expressions, adding sorting to selections, extending by
providing custom XPath extension functions etc.
--
Oleg Tkachenko
XML Insider
http://www.tkachenko.com/blog
Nov 12 '05 #2

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

Similar topics

3
1405
by: Mike King | last post by:
I want to ask a general question to see if anyone has done a similar thing. I'm thinking about creating an application that will allow me to run queries across several XML files. I would like to use the power of the XSLT language to help me with this problem. So I'm thinking about creating a very simplistic language similar to XSLT that will accomplish this. I will use XSLT to transform my language into XSLT. That XSLT will produce an...
0
1407
by: Oleg Paraschenko | last post by:
Hello, might be of some interest: find with XPath over file system http://uucode.com/texts/xfind/index.html <quote> The standard UNIX utility find now supports XPath:
7
8100
by: mike p. | last post by:
I have a docbook xml file, and am using standard docbook 1.61.3 xsl stylesheets to do xhtml transform. Transform works fine when using MSXML. When I try to do the following using asp.net 1.1: private void Page_Load(object sender, System.EventArgs e) { // load content XslTransform trans = new XslTransform();
6
2806
by: Stefan Lischke | last post by:
Hi there, I'm still implementing the XML pub/sub System i told in my last mail. But i think i have to reeinvent the wheel when using Microsoft .Net Where can i get the Source Code of XPathExpression and the way .net handles XML in XPathDocument? As i told in my last mail, i want to implement YFilter, so one can apply a big amount of XPath filters to a XML stream. (using a big state machine which combines all querys->path sharing)
5
4207
by: laks | last post by:
Hi I have the following xsl stmt. <xsl:for-each select="JOB_POSTINGS/JOB_POSTING \"> <xsl:sort select="JOB_TITLE" order="ascending"/> This works fine when I use it. But when using multiple values in the where clause as below
3
3643
by: Eugen Gulinsky | last post by:
Hello guys, I am having problems trying to migrate our MSXML4-compatible stylesheets containing large msxsl:script blocks to a formate understandable by System.Xml:Xsl.XslTransform. I keep getting JS1135 errors saying that some variable was not declared. This scripts worked perfectly with MSXML4. Is there a guide for migraiton from MSXML to .NET or can you just give me some tips on how to resolve this issues without having to change...
0
3427
by: nima | last post by:
Hi I have two tables in my database. PRODUCT and PRODUCT_GROUP. PRODUCT has a foreign key to PRODUCT_GROUP. I generated a typed dataset using VS.net and added a relationship between the two tables. When I call my get WebMethod for the PRODUCT table I get the System.Data.ConstraintException exception. The get WebMethod for PRODUCT_GROUP works fine. When I remove the relationship the get WebMethod for PRODUCT works fine too. Both tables...
4
4571
by: Daniel | last post by:
Is it possible to use regular expressions inside of an xpath statement executed by System.Xml.XmlDocument.SelectSingleNode() ? string sdoc = "<foo><bar a='1'/><bar a='2'/></foo>"; System.Xml.XmlDocument pdoc = new System.Xml.XmlDocument(); pdoc.LoadXml(sdoc); System.Xml.XmlNode pnode = pdoc.SelectSingleNode("//foo/bar/matches(.,'\\d')"); string foo = pnode.InnerText; int i23 = 23 + 23;
0
1331
by: sara77 | last post by:
I have a web service that receives an xml Node and xpath and should send back the matching node. My code works fine, the only problem is when the matching node is an XmlAttribute then it throws the following exception: System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.InvalidOperationException: There was an error generating the XML document. ---> System.InvalidOperationException: Cannot write a...
0
8771
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8691
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
9275
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...
1
9038
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
8981
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
7895
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...
0
4441
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4705
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2492
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.