Is there a way to use data from the current context to filter nodes somewhere else in the statsource.
For instance, if I have this XML:
<root>
<group1>
<inst>
<type>Foo</type>
<value>First Foo</value>
</inst>
<inst>
<type>Bar</type>
<value>The Bar</value>
...
I have an auditing/logging system that uses raw XML to represent actions taken out by an application. I'd like to improve on this system greatly by using an XML column in a table in the application's SQL Server database.
Each row in the table would contain one log entry and each entry should contain one or more tags that are used to de...
hi
i've got a problem when i'm using libxml with XPath. I want to parse an youtube playlist :
<?xml version='1.0' encoding='UTF-8'?>
<feed xmlns='http://www.w3.org/2005/Atom'
xmlns:openSearch='http://a9.com/-/spec/opensearch/1.1/'
xmlns:media='http://search.yahoo.com/mrss/'
xmlns:batch='http://schemas.google.com/gdata/batch'
xm...
Hello all, I'm trying to wrap my head around XML and XSLT stuff, and in my research I stumbled upon different XSLT processors.
Xalan was the first one, and it seems to work pretty fine and is free, except that I need/want to use features in the 2.0 specs, including XML Schema. To do so I must either work with extensions and Xalan, or sw...
With my current node selected I wish to find an element <name> [./name] and return the text content. If an element <name> does not exist in the currently selected node I wish to check the parent element [./parent::name] and so on recursively up to the root, returning the value of the nearest parent where the element exists.
Can it be do...
I'm trying to scrap customer reviews from a site and ran into an interesting set-up.
<div class="Review">
<img class="stars" etc>
<b>ReviewerName</b>
- yyyy-mm-dd
<br/>
<p>Review</p>
<a>was this helpful links</a>
<hr/>
<br/>
<!-- Repeat above for additional reviews. -->
</div>
For the life of me I can't come up with ...
Hello
I have this code
<?PHP
$content = '<html>
<head>
<title></title>
</head>
<body>
<ul>
<li style="border:0px" class="list" id="list1111">
<a href="http://www.example.com/" style="font-size:10px" class="mylinks">
<img src="logo.gif" width="235" height="...
I have a DLL which I (for many reasons) cannot change. I use this assembly to retrieve a an XPathNodeIterator.
I know I can sort XML with an XPathExpression on an XPathNavigator to get an XPathNodeIterator, the problem is that I start from the XPathNodeIterator is there any way to apply a sort afterward?
...
I am looking for a way to take a xpath for an instance xml file and use it to find the xsd element. If possible are there any xsl or .net examples?
...
I am using Nokogiri 1.3.3 with Ruby 1.8.7 I am trying to match the content of a tag as described in this SO question:
nodeset.xpath("entry/index[. = '#{index.to_s}']/../categories")
Nokogiri raises an exception complaining about the '.' after the bracket. When I replace the '.' with text() it then complains about the second period. ...
Hello
when I want to test php array I use the following code
print_r($myarray);
but know I want to see the data of an object
my object is
$xpath = new DOMXPath($doc);
$myobject = $xpath->query('//*[ancestor-or-self::a]');
when I use
print_r($myobject);
I get that output
DOMNodeList Object ( )
I want to i...
Hi,
So I'm trying to parse the following XML document with C#, using System.XML:
<root xmlns:n="http://www.w3.org/TR/html4/">
<n:node>
<n:node>
data
</n:node>
</n:node>
<n:node>
<n:node>
data
</n:node>
</n:node>
</root>
Every treatise of XPath with namespaces tells me to do the following:
XmlNamespaceManager mgr...
I have some processing-instructions elements inside my xml content, for example :
<?legalnoticestart?>
<?sourcenotestart?>
<para>Content para</para>
<?sourcenoteend?>
<?literallayoutstart?>
<para>body content </para>
<?literallayoutend?>
<?legalnoticeend?>
How can i match these elements and get the content in the below required eleme...
I'm trying to scrape a page where the information I'm looking for lies within:
<tr class="defRowEven">
<td align="right">label</td>
<td>info</td>
</tr>
I'm trying to get the label and info out of the page. Before I was doing something like:
$hrefs = $xpath->evaluate("/html/body//a");
That is how I'm grabbing the URL's. Is t...
I'm new to using XPath so I've been fooling around with an XPath Evaluator and I'm trying to find out how to return the value of a function.
If I want to return the hrefs of all the links on a page I can use the following XPath:
//a/@href
If I want to return all the links with hrefs longer than 20 chars I can use this:
//a[string-le...
I've got an XPathNavigator at the root of a document. Several levels down, there's a group of numeric values that I want to sum. I could always loop through the nodes and add them myself, but since I knew the XPath spec included a sum function, I decided to try to use that. I'm running into an error.
System.Xml.XPath.XPathException - Ex...
I'm kind of new to XSLT, and I've gotten basic transformation done. Next I want to try out date manipulations, since my data will have timestamps. However, I can't seem to get any date functions to work, and it greatly frustrates me. I'm testing using Firefox 3.5, xsltproc 1.1.24, xalan 1.10, and XMLSpy 2009, and they all say that the fu...
I'm using nokogiri with an xml document that looks something like this:
<songs>
<song>
<artist>Juana Molina</artist>
<album>Un Dia</album>
<track>8</track>
<title>Dar (Qué Difícil)</title>
<rating>5</rating>
<filename>\Juana Molina\Un Dia\08 - Juana Molina - Dar (Qué Difícil).mp3</filename>
...
I have the problem to get the node if there is more than one attribute.
Example:
<div class="atag btag" />
This is my xpath expression: //*[@class='atag']
The expression only works with <div class="atag" /> but not for the above shown.
Any suggestions?
...
How to convert XML xpath as case insensitive?
XmlNodeList elements = mConfig.SelectNodes(path);
path can be - Config/Setting/Name or config/setting/name
...