Hi all,
I have some XML:
<metadata>
<dataIdInfo>
<idCitation>
<resRefDate>
<refDate>1996</refDate>
<refDateTyp>
<DateTypCd value="007" />
</refDateTyp>
</resRefDate>
<resRefDate>
<refDate>1998</refDate>
<refDateTypCd>
<DateTypCd value="003" />
<...
Can the Xpath of XSD schema text() elements be retrieved in vb.net? For example, how can you get this Xpath from the following schema;
parent/child/grandchild
<?xml version="1.0" encoding="utf-8"?>
<xs:schema attributeFormDefault="unqualified"
elementFormDefault="qualified"
xmlns:xs="http://www.w3.org/2001/XMLSche...
Hi,
Can anyone point me to a good tutorial on xpath or give me a quick lesson here? Also if xpath is for querying xml, what would I need to use to modify the xml? I guess it would need to be something that works hand in hand with xpath?
Cheers,
Franky
...
I have this line:
<xsl:when test="document('foo.xml')/field_config/field_rename/field[@old_name = $name]/@new_name">
foo.xml:
<field_config>
<field_rename>
<field old_name="Modified" new_name="modification"/>
<field old_name="Created" new_name="creation"/>
</field_rename>
</field_config>
In general, what is this testing?
...
I want to get a set of elements from a xml-file, but as soon the the elements involve namespaces, it fails.
This is a fragment of the xml file:
<gpx xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
version="1.0" creator="Groundspeak Pocket Query"
xsi:schemaLocation="ht...
I need a way to select elements via xpath (NOT CSSpath or any other method, must strictly be xpath)
$(document).find("/html[1]/body[1]/div[4]/div[2]/div[1]/h1[1]/a[1]").css("background-color", "yellow")
This doesn't seem to work.
...
Hi,
I am trying to remove a child node from a parent node using xquery. Say, I have an entry shown below in my xml:
<entry>
<id>36</id>
<title>Engineering Village Author Tool</title>
<updated>2009-09-30T12:55:42Z</updated>
<libx:libapp>
<libx:entry xmlns:libx="http://libx.org/xml/libx2" src...
i am trying to grab links from the Google search page. i am using the be below xpath to
//div[@id='ires']/ol[@id='rso']/li/h3/a/@href
grab the links. xPather evaluates it and gives the result. But when i use it with my php it doesn't show any result. Can someone please tell me what I am doing wrong? There is nothing wrong with the cU...
XML Source:
<documents>
<document>
<id>3</id>
</document>
<document>
<id>7</id>
</document>
<document>
<id>1</id>
</document>
</documents>
I need the document-element with the highest value in its id-element (so <document><id>7</id></document> in the example). I can't change the C# code,...
Hi,
I'm trying to use an xpath expression to select a node-set in an xml document with different namespaces defined.
The xml looks something like this:
<?POSTEN SND="SE00317644000" REC="5566420989" MSGTYPE="EPIX"?>
<ns:Msg xmlns:ns="http://www.noventus.se/epix1/genericheader.xsd">
<GenericHeader>
<SubsysId>1</SubsysId>
<S...
I need to parse the following sample html using xpath query..
<td id="msgcontents">
<div class="user-data">Just seeing if I can post a link... please ignore post
<a href="http://finance.yahoo.com">http://finance.yahoo.com</a>
</div>
</td>
<td id="msgcontents">
<div class="user-data">some text2...
<a href="http://abc.com...
I have an XML file structured like this
<serieslist>
<series sid="123">
<title type="main">Series 123 Main Title</title>
<title type="official">Series 123 Official Title</title>
<title type="short">S 123</title>
</series>
<series sid="456">
<title type="main">Series 456 Main Title</title>
...
I have such xpath expression :
link[@rel='alternate' and @type='text/html' or not(@rel)]/@href | link/text()
?
Acctually I don't understand the symbol |
...
I'm trying to filter an XML file using XPath. The XPath that I'm using is definitely filtering to the data that I want, but I'm just not sure how to filter the file overall.
Here's the sample XML file:
<fields>
<field name='F'>
<field name='0'><value>F.0 stuff</value></field>
<field name='1'><value>F.1 stuff</val...
I am new to Nokogiri and xpath and I am trying to access all comments in a HTML or XML fragment.
The xpath ".//comment()" and "//comment()" works when I am not using the fragment function, but it does not find anything with a fragment. With a tag instead of a comment, it works with the first xpath.
By trial and error, I realized that in...
I have a very specific problem where I want to be able to extract the default attribute value of an element as illustrated in the example below.
Every item in the input XML contains multiple child name elements, one to represent the primary name, which is the default attribute value (type='main') and another secondary name (type='short'...
Hi all,
I am trying to use XPath to get a list of all the persistence units in persistence.xml and am having trouble. The one that I thought would work was:
//persistence/persistence-unit
*
The latter gives me the persistence child which is at least something, I can then manually iterate through, but that defeats the purpose of XPa...
I have a XML code like this:
<?xml version="1.0" encoding="utf-8" ?>
<Window
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Grid>
<Label/>
<Label/>
<Label/>
</Grid>
</Window>
In code, this is represented...
I followed the tut in w3school
http://www.w3schools.com/xpath/xpath_syntax.asp
it says:
nodename Selects all child nodes of
the named node
bookstore Selects all the child nodes
of the bookstore element
and here's my code
bookstore.xml:
<?xml version="1.0" encoding="ISO-8859-1"?>
<bookstore>
<book>
<title lang="eng">Ha...
Hello!
I'm using xpath and LibXML in an iPhone app to find some nodes in an xml document. I'm a noob in xpath so probably i am doing something wrong.
Here is the xml:
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs...