Given the following XML file:
<?xml version="1.0" encoding="UTF-8"?>
<doc>
<head>
<title>Introduction</title>
<section>section</section>
<channel>testing/test</channel>
</head>
<body>
<h1>Heading</h1>
<p>Lorem ipsum dolor sit amet.</p>
<p>Donec sed enim.</p>
</bod...
I want to parse an XML using jquery. Is it possible to parse using XPath. is there any functions for that in jquery??
...
I'm trying to parse the xml of an rss feed (StackOverflow's funnily enough), and I want to get the ID, date, title and link from each rss entry for my rss feed reader.
Using Liquid XML Studio, I have code as follows:
XmlNamespaceManager nsMgr = new XmlNamespaceManager(xmlDoc.NameTable);
nsMgr.AddNamespace("tns", "http://www.w3.org/2005...
Is it possible to select a node using an XPathNodeIterator and get the Outer Or InnerXML without indentation?
Since the results are used in XHTML output the indentation (using spaces) will result in layout differences.
Sample code snippet:
xmlDoc = New XPathDocument(fileIn, xmlSpace.Preserve)
xmlNav = xmlDoc.CreateNavigator()
Dim xmlN...
Hi, I'm trying to add a bunch of html to an existing nodeset, at the top. It mostly works, but the style tags and script tags are getting scrubbed of their content. Here's what I mean:
doc.xpath("//head/*[1]").before("<script>var xb=25</script>")
But if I try to display this, this is what I get:
hdoc.xpath("//head/*[1]")
=> <script><...
Assuming there is some way to do this... I am using WSS 3.0 and SP Designer 2007. I've changed a list to its XSLT data view in SPD, and am trying to add a formula to display the first 250 characters of the body text, and then IF there are additional characters, add a "(more)" link to the list item.
The problem I'm running into is the co...
Given the following XML:
<cfsavecontent variable="xml">
<root>
<parent>
<child>I'm the first</child>
<child>Second</child>
<child>3rd</child>
</parent>
<parent>
<child>Only child</child>
</parent>
<parent>
<child>I'm 10</child>
<child>I'm 11!</child>
</parent>
</root>
</cfsavecontent...
Hello,
I am using iReport 3.5.2 to create a report using an XML data source. I followed the "Step by step" example from the "Sub-reports" section of "The Ultimate Guide to iReport", and I was able to get the example working with SQL. However, when I try to use an XML data source and XPath, the sub-report comes out blank in the master r...
Is there a more direct way in umbraco to iterate nodes based on a list of IDs than this?
$currentPage/ancestor-or-self::root/descendant::node[contains($idList, @id)]
I'm just curious. It seems akward to traverse up the tree from the currentPage node to find the root before traversing back down.
...
I want to sort below xml, Based on the Adult and child ( i need to take Adult and child as constant):
<HotelDetails>
<hotel>
<rooms>
<room>
<roomname>Single</roomname>
<Price>100</Price>
<Adult>1</Adult>
<child>0</child>
</room>
</rooms>
<rooms>
<room>
<roomname...
In an XML document, I have elements which share the same name, but the value of an attribute defines what type of data it is, and I want to select all of those elements which have a certain value from the document. Do I need to use XPath (and if so, could you suggest the right syntax) or is there a more elegant solution?
Here's some ex...
I am creating very simple CMS for my organisation.
My strategy is to embed editable content between tags called < editable >. However to hide these from the browser I am commenting them out. So an example of an editable region will look like this.
<!-- <editable name="news_item> Today's news is ... </editable> -->
With the content "T...
Are there any production-ready libraries for streaming XPath expressions evaluation against provided xml-document? My investigations show that most of existing solutions load entire DOM-tree into memory before evaluating xpath expression.
...
The XPath "/bookstore/book[1]" select the first book node under bookstore.
How can I select the first node that matches a more complicated condition, e.g. the first node that matches "/bookstore/book[@location='US']"
...
I've got an XML document with many different namespaces in use and a schema to validate against. The schema requires that all elements be "qualified", and I assume this means that they need to have full QNames without a null namespace.
However, some elements in this giant XML document have slipped through using just the default namespac...
I have the following XML:
<root>
<foo>
<bar type="a whole bunch of stuff, then a magic string: MUPPET" />
<value>my Muppet value</value>
</foo>
<foo>
<bar type="some other stuff, then a different magic string: GREMLIN" />
<value>my Gremlin value</value>
</foo>
</root>
I'd like to build an XPath query that retur...
I'm new to xpath and am running into troubles with PHP's ancient XPath implementation. Is it correct, that //@url is just the abbreviated form of //attribute::url? I'm trying to query the flickr rss for testing, but the abbreviated query finds the correct nodes, whereas the verbose one returns 0 elements:
$xml = file_get_contents('http:...
I have:
a table with an xml type column (list of IDs)
an xml type parameter (also list of IDs)
What is the best way to remove nodes from the column that match the nodes in the parameter, while leaving any unmatched nodes untouched?
e.g.
declare @table table (
[column] xml
)
insert @table ([column]) values ('<r><i>1</i><i>2</i>...
In XSLT, what is the difference between the "current node" and the "context node"? You can find both terms used here:
http://www.w3.org/TR/xslt
When would you use one or the another? How do you refer to each?
...
Hi,
can you use xpath to access an html element?
It must run in interenet explorer, and i am writing it in javascript
I am trying to get the value of a specific input box in a specific row, but i don't want to have to iterate through all the cells to get the right one
Any help would be appreciated
Emma
...