I have XML similar to the following
<?xml version="1.0" encoding="utf-8"?>
<foo name="FooBar" xmlns="http://mydomain/myapp/ver/myschema.xsd">
<bars v="test">
<bar bat="one"/>
<bar bat="two"/>
<bar bat="three"/>
</bars>
</foo>
How do I map this in WPF, it works if I don't set the default namespace, ho...
i am trying to round a number to 2dp and i am struggling
i am trying to use the decimal-string method
This is what I had
<xf:bind nodeset="/stuff/price"
calculate = "if(boolean-from-string(/stuff/amountOff),
((/stuff/items) * (/stuff/duration) * 0.8),/stuff/items* /stuff/duration)" />
This is what I tried
<xf:bind
n...
Suppose I have xml like this:
<Products>
<Product name="Liquid Oxygen">
<Manufacturer name="Universal Exports" country="UK" />
</Product>
<Product name="Hydrazine">
<Manufacturer name="ACME Inc." country="USA" />
</Product>
<Product name="Gaseous Oxygen" obsolete="true">
<Manufacturer name="Universal Exports" count...
Hi,
Given the following: You will note that embedded in this xml sample is an Organisation node with its' own namespace declared with xmlns=""
This is declared like this rather than using a prefix.
Is there any way of finding all the namespaces declared in an xml document using xpath?
I have tried a few variations, unfortunately xmlns...
I have a small XML file:
<wddxPacket version='1.0'>
<header/>
<data>
<struct type='coldfusion.runtime.ArgumentCollection'>
<var name='HEADLINE'>
<string>Richard Barret's Articles on Leadership and High Performance Organisations</string>
</var>
</struct>
</data>
</wddxPacket>
I'm trying to use PHP Simp...
Hi
I am looking to write an XPath query to return the full element ID from a partial ID that I have constructed. Does anyone know how I could do this? From the following HTML (I have cut this down to remove work specific content) I am looking to extract f41_txtResponse from putting f41_txt into my query.
<input id="f41_txtResponse" c...
when I output the value of the node directly for example:
<fo:inline><xsl:value-of select="isEnabled" /></fo:inline>
I get the correct string outputted in pdf "true"..
but if I set the value of isEnabled directly to a variable and then try to do the comparison on it.. it doesn't seem to work as if the node doesn't exist.
<xsl:vari...
I have the following XML (simplified example) which should have a parent/child relationship between two ComboBox's. The parent binds correctly but the child does not bind to the parents SelectedItem.
When I set xmlns against the foobar XML and remove all namespace references it works as expected. Also if I set ItemsSource="{Binding XPat...
I have the following xpath statement in a selenium test:
//tbody/tr[td/span[text()='IPODate']]/td[4]/input
It gets what I want but my tests are painfully slow in IE6. Anyone know how I would do the same selector as CSS selectors? I think I understand how to do each of these with exception to the text()="IPODate" part.
As requested he...
I'm trying to download an HTML page, and parse it using XMLHttpRequest(on the most recent Safari browser). Unfortunately, I can't get it to work!
var url = "http://google.com";
xmlhttp = new XMLHttpRequest();
xmlhttp.open("GET", url);
xmlhttp.onreadystatechange = function(){
if(xmlhttp.readyState==4){
response = xmlhttp.responseTe...
xml:
<entry>
<link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="http://picasaweb.google.com/data/feed/api/user/xy/albumid/531885671007533108" />
<link rel="alternate" type="text/html" href="http://picasaweb.google.com/xy/Cooking" />
<link rel="self" type="application/atom+xml" href="http://picasa...
I need to match elements that contain neither PCDATA nor children elements.
I tried this :
.//myelem[count(nodes())=0]
but nodes() is unknown in XPATH 1.0.
What is the most concise way that you know of to do this in XPATH 1.0 ?
...
Hello
Apologies if this has been answered before.
I've been trying to construct an XPath expression to retrieve only the text portion from an element such as this (containing text as well as other elements)
...
<td id="test">
The text I want.
<table>
Things I do not want
.....
.....
</td>
I hav...
I find XPath difficult to get my head around at times and am looking for a tools that I can point at a line in an xml config file an it will tell me the xpath to the attributes that I need.
Any help with this would be much appreciated>
...
I think this might be more accurately called "paging"... not sure. I am getting a chunk of XML (lets say 100 nodes) I then want to display only a set number of them at a time on a page. How do you do this?
For reference, in .NET it would be something like this:
// Get some results. These are an XPathExpression
XPathNodeIterator...
XPathNavigator navigator = myApp.XML.CreateNavigator();
XPathExpression expression = navigator.Compile("true"); //works
XPathExpression expression = navigator.Compile("true or true"); //works
XPathExpression expression = navigator.Compile("true OR true) //'System.Xml.XPath.XPathException'
...
Hi
I try to index over results returned by an xpath. For example:
xpath = '//a[@id="someID"]'
can return a few results. I want to get a list of them. I thought that doing:
numOfResults = sel.get_xpath_count(xpath)
l = []
for i in range(1,numOfResults+1):
l.append(sel.get_text('(%s)[%d]'%(xpath, i)))
would work because doing som...
When you run the following code, StatusCode is returned as null.
What am I doing wrong?
var xml = @"<?xml version='1.0' encoding='UTF-8'?>
<kml xmlns='http://earth.google.com/kml/2.0'>
<Response>
<name>The Name</name>
<Status>
<code>200</code>
...
Hi,
I'm trying to get an XPath expression together that will give me all the descendent elements of a node that match a filter (e.g. [contains(@class,"interesting")] but which don't have a specific ancestor e.g. [contains(@class,"frame")]. Probably best explained by example:
<div class="frame">
<p class="interesting">alice...
Assuming I want to find a table with certain width and height attributes
No problem with
doc.DocumentNode.SelectSingleNode("//table[@width='500']");
Would it be possible to add height='500' somehow to this Xpath expression ?
...