473,378 Members | 1,462 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,378 software developers and data experts.

Using XPATH to select a passage of text (C#)

Hey there guys. I have a problem that I need some help with. I'm given a series of different XML files, and have to go through and pull out passages of text from said files. The passages are defined by a start path and an end path, and have a size. I know practically nothing about the underlying XML in these files, and so am reliant on the paths. I am using C# and the System.XML.XPath library.

What I would like to know is is there a way to select a collection of nodes that exist between two xpath points in the file?

Any help is much appreciated.
May 9 '07 #1
1 1869
dorinbogdan
839 Expert 512MB
Welcome to TheScripts TSDN....

You can use position() function to get the position of the 2 xpath points in order to find the range of the desired nodes.
For some examples see this link.
May 10 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: gael.pegliasco | last post by:
Hi, How are you dear and nice helper :) ? I'm trying to test xpath with this simple program : import xml.dom.minidom from xml.xpath.Context import Context import xml.xpath
2
by: Peter Gerstbach | last post by:
Hi, I want to convert with XSLT/XPATH a String like "Aaa bbb ccc" with variant length into to "AaaBbbCcc". I think it should be possible with these steps: 1) tokenize the String with ' ' as...
6
by: Mark Miller | last post by:
I have a scheduled job that uses different XSL templates to transform XML and save it to disk. I am having problems with the code below. The problem shows up on both my development machine (Windows...
2
by: Daniel Walzenbach | last post by:
Hi I need to know how to transform a XML file by using a XSLT file. Consider the following XML file <?xml version="1.0" encoding="UTF-8" standalone="yes"?><LogFile><Dog TimeStamp="16.02.2004...
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>
4
by: joe_public34 | last post by:
Hello all, I'm trying to write a script to log into Yahoo! (mail, groups, etc), but when I pass the full URL with all form elements via Python, I get a resutling 400 - Bad Request page. When I...
2
by: nick_tucker | last post by:
Hi, I am very new to XML and XPATH. I have made a sample XML fileto ask my question. <?xml version="1.0" encoding="utf-8"?> <Test> <A> <B> <C> <D>
3
by: Goran Djuranovic | last post by:
Hi All, Does anyone know how to retreive deepest XPath value from XML document by using VB.NET? For example, if I had an XML file like this: <Root> <Customer> <Name>MyName</Name> </Customer>...
2
by: shapper | last post by:
Hello, I am for days trying to apply a XSL transformation to a XML file and display the result in a the browser. I am using Asp.Net 2.0. Please, could someone post just a simple code example,...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...

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.