I have the following xml snippet
<ZMARA01 SEGMENT="1">
<CHARACTERISTICS_01>X,001,COLOR_ATTRIBUTE_FR,BRUN ÉCORCE,TMBR,French C</CHARACTERISTICS_01>
<CHARACTERISTICS_02>X,001,COLOR_ATTRIBUTE,Timber Brown,TMBR,Color Attr</CHARACTERISTICS_02>
</ZMARA01>
I am looking for an xpath expression that will...
Hello,
From this piece of HTML:
<tbody>
<tr>
<tr id="1" class="first">
<tr id="2" class="">
<tr id="3" class="last">
<tr id="4" class="first">
<tr id="5" class="">
<tr id="6" class="last">
<tbody>
I´m trying to get an xPath expression to return all tr[@class='first'] nodes followed by tr which don´t have a...
I am trying to get the text elements of a table that follows a paragraph that contains a specific text element using XQuery on MS SQL Server. The problem is whenever I use the axes "following", "following-sibling" or "previous-sibling", I get an error saying this is not supported in SQL Server (I'm using version 2008). So for instance,...
I have an xml file like this:
<volume name="Early">
<book name="School Years">
<chapter number="1">
<line number="1">Here's the first line with Chicago in it.</line>
<line number="2">Here's a line that talks about Atlanta</line>
<line number="3">Here's a line that says chicagogo </line>
</chapter>
</book>
</volume>
I'm trying to do a ...
Here is my code, maybe you will notice right away what I'm missing :
DocumentBuilderFactory domFactory = DocumentBuilderFactory.newInstance();
DocumentBuilder builder = domFactory.newDocumentBuilder();
Document doc = builder.parse(fileName));
XPathFactory fact...
Dear all,
I'm having a hard time figuring out where the problem is coming from, so I'm posting this in the hopes that others might have found something similar to this elsewhere and are kind enough to share their insight.
I'm using a JBoss 5.0.1.GA application server running on top of a Sun Java 1.6.0-13 JDK. For the WAR file in the ge...
I have XML document which is something like
<X><Y><Values><double>1.0</double><double>2.0</double></Values>...
I am trying to get those values:
toXpath.MoveToRoot(); // the X node name could be different
toXpath.MoveToFirstChild(); // this should be Y
string q = "Y/Values";
foreach (XPathNavigator x in toXpath.Select(q))
In x.Val...
Hi!
I am wondering if it is possible to use XPath or XSL to determine if a XML node value is numerical or alpha/numerical. (It is user entered data.. so it could be either..)
I was searching for some sort of function in XPath to do this.. but I couldn't find any.
for example:
<example>
<test1 attribute="123">12dfffg23</test1>
...
When I use "apply-templates" and select a variable sequence, does the template act upon the context of the element in the sequence, or does it act upon the context of the element in the document?
In the below example, it seems to do either, or none, but I don't understand why.
<root>
<a/>
<b/>
<c><a/></c>
<a/>
</root>
<?xml version="...
I'm looking for a way to concatenate two arbitrary, valid XPath expressions to build a new XPath expression.
Effectively I'd like to apply the second XPath expression on the result of the first XPath expression.
For example, take this XML:
<foo>
<bar>
<baz />
</bar>
<foo>
The XPath expression /foo would obviously return the ...
I am using Watir to write some tests for a web application. I need to get the text 'Bishop' from the HTML below but can't figure out how to do it.
<div id="dnn_ctr353_Main_ctl00_ctl00_ctl00_ctl07_Field_048b9dfa-bc64-42e4-8bd5-b45385e5f45b_view" style="display: block;">
<div class="workprolabel wpFieldLabel">
<span title="Please s...
Hi,
I am trying to enumerate all the namespaces in a document using XPath.
The following works in xmlspy, but not in .NET
//*/namespace-uri(.)
// Executing this in linqpad, I get the error below.
xml.CreateNavigator().Select("//*/namespace-uri(.)").Dump();
// the error below.
XPathException: ('//*/namespace-uri(.)' has an invalid toke...
hello everyone ,
i have an xml file "Machine.xml" it contains:
<Parameter name="host" value="localhost"/>
<Parameter name="port" value="5900"/>
i would like to change both parameters values using a php script... how can i do that?
i mean i want the script to change host's value for example to : value="7.3.4.5" and
port value to...
I have a table that consists of multiple rows that each contain 5 cells, like this:
<tr>
<td></td>
<td>123456</td>
<td>statusText</td>
<td><a>linkText</a></td>
<td>editButton</td>
</tr>
The 123456 could be any string of random letters and numbers. I want to be able to select a link based on the contents of the sec...
I have a group with the following attributes:
<mygroup>
<item id="0">
<item id="1">
<item id="2">
</mygroup>
when I cal the expression /mygroup/item I need to re-order the nodeset according the attribute "id", there is a way to do it without using the sort template?
...
I try to extract specific data from an xml feed that comes from youtube.
XML link: http://gdata.youtube.com/feeds/api/videos/WFPnl8aEPgo?alt=rss
I've been able to extract info like:
Title,
Description
using this query string:
Dim Title As String =
videoInfoNavigator.SelectSingleNode("/item[1]/title").Value
However, I'm not ab...
I'm processing an HTML page with a variable number of p elements with a css class "myclass", using Python + Selenium RC.
When I try to select each node with this xpath:
//p[@class='myclass'][n]
(with n a natural number)
I get only the first p element with this css class for every n, unlike the situation if I iterate through selectin...
<?xml version="1.0" encoding="ISO-8859-1"?>
<users>
<user number="0775547857">
<step stepnumber="1">complete</step>
<step stepnumber="2">complete</step>
<step stepnumber="3">complete</step>
</user>
<user number="0775543754">
<step stepnumber="1">complete</step>
<step stepnumber="2">complete</step>
</user>
<user number=...
Hello,
I have the following XML
<question>
<questiontext>How old are you?</questiontext>
<options>
<option oldScore="0" Score="20">17-25</option>
<option oldScore="8" Score="12">26-30</option>
<option oldScore="20" Score="2">31-50</option>
<option oldScore="16" Score="10">51-60</option>
<option...
In my PHP script, I'm using XPATH to search nodes for text. Everything works swimmingly -except - when I search for a word with an apostrophe.
basically my code looks like this
$keyword = $_GET['keyword'];
...snip...
$xml = simplexml_load_file($data);
$search = strtolower($keyword);
$upper = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
$lower =...