We are start working with J2ME application where we need the XML parsers based SAX, DOM and Xpath navigation support.
I found kXML recommended by many developers. What are other free/open source libraries available you found useful and using in your application?
...
I am looking to get the value A-1 through xpath based on a passed attribue.
I have passed the index attribute of the unit through php from a previous page and am accessing it by global GET:
$value = intval($_GET['index']);
the xml:
<UNIT index='1'>
<ID>A-1</ID>
<MANUFACTURER>testing inc.</MANUFACTURER>
</UNIT>
<UNIT inde...
I get this error:
Notice: Trying to get property of non-object in
Applies to:
echo $result->Data;
And this output:
Array ()
Background Informations
A function returns a string which contains an XML file.
I want to get some data from two tags and deal with them on their own.
String Data
$data="
<SyncML xmlns='SYNCML:SYNCML1.0'...
I am looking for some examples of using xpath in Android? Or if anyone can share their experiences. I have been struggeling to make tail or head of this problem :-(
I have a string that contains a standard xml file. I believe I need to convert that into an xml document. I have found this code which I think will do the trick:
public...
Dear All:
I would like to evaluate an XPath expression relative to a given
element.
I have been reading here:
http://www.w3schools.com/xpath/default.asp
And it seems like one of the syntaxes below should work (esp no leading
slash or descendant:)
However, none seem to work in HTMLUnit. Any help much appreciated (oh
this is a groovy s...
Can somebody help me find the mistake I am doing in evaluating following XPath expression?
I want to get all "DataTable" nodes under the node "Model" in my xml through XPath.
Here is my XML doc:
<?xml version="1.0" encoding="UTF-8"?>
<Root>
<Application>
<Model>
<DataSet name="ds" primaryTable="Members" openRows="1">
...
I'm trying to parse HTML file with libxml2. Usually this works fine, but not in this case:
<p>
<b>Titles</b>
(Some Text)
<table>
<tr>
<td valign="top">
…Something1...
</td>
<td align="right" valign="top">
…Something2...
</td>
</tr...
I had been trying to extract links from a class called "tim_new" . I have been given a solution as well.
Both the solution, snippet and necessary information is given here
The said XPATH query was "//a[@class='tim_new'], my question is, how did this query differentiate between the first line of the snippet (given in the link above and ...
Hello.
My XML file as below. It mixed schema and normal elements.
<?xml version="1.0" encoding="utf-8"?>
<!-- R1 -->
<ax:root xmlns:ax="http://amecn/software/realtime/ax">
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:element name="EquipmentConstants">
<xsd:complexType>
<xsd:sequence>
...
Hi,
i need to increment current date by 7 days and i'm wondering if it's possible to do that using a xpath function.
thanks !!
...
Hello,
I have this XML file:
<recursos>
<recurso url="http://w3c.com">
<descripcion>Consorcio W3C</descripcion>
<tipo>externo</tipo>
<idioma>ingles</idioma>
<contenido>General</contenido>
<unidad>Unidad 2</unidad>
</recurso>
<recurso url="http://html.com">
<descripcion>...
I am attempting to apply an XSLT transformation to a batch of XML documents. The main point of the transform is to re-order several elements. I wish to preserve any comments that directly precede an element:
<!-- not this comment -->
<element />
<!-- this comment -->
<!-- and this one -->
<element />
The closest I've come to a solut...
Hi, I am trying to get the XPath "/deployment/service". Tested on this site:
http://www.xmlme.com/XpathTool.aspx
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<deployment xmlns="http://xml.apache.org/axis/wsdd/" xmlns:java="http://xml.apache.org /axis/wsdd/providers/java">
<service name="kontowebservice" provider="java:RPC...
I maybe be trying to do something invalid here, but maybe someone smarter than me knows the correct syntax to solve my problem.
Given:
<group code="vehicle">
<line code="car">
<cell>
<box code="price">1000.00</box>
</cell>
</line>
<line code="car">
<cell code...
In this xml, I want to match, the element containing 'match' (random2 element)
`<root> <random1> <random2> match </random2> <random3> nomatch </random3> </random1> </root>`
ok, so far I have:
//[re:test(.,'match','i')] (with re in the proper namespace)
this returns random2, random1 and root... I would like to get only "random2"
an...
I am kind of repeating this question because mostly due to my own ignorance, I could not fully understand the innards.
Given this HTML snippet
<td valign=top class="tim_new">
<a href="/stocks/company_info/pricechart.php?sc_did=MI42" class="tim_new">3M India</a>
</td>
<td class="tim_new" valign=top>
<a href='/stocks/marketstats/indc...
Sample XML:
<assignments>
<assignment id="911990211" section-id="1942268885" item-count="21" sources="foo">
<options>
<value name="NumRetakes">4</value>
<value name="MultipleResultGrading">6</value>
<value name="MaxFeedbackAttempts">-1</value>
<value name="ItemTakesBeforeHint">1</value>
<value...
hi,
I got struck with a problem in VB.Net getting Xpath for an XML element as shown below:
<Parent xmlns:"http://www.sample.com">
<body>
<Child xmlns:"http://www.notsample.com">
<element type="xyz"> ghghghghghg </element>
</Child>
</body>
</Parent>
I need Xpath of the "element" in...
I'm trying to match a pattern into a string in XSLT/XPath using the matches function, as follows:
<xsl:when test="matches('awesome','awe')">
...
</xsl:when>
However, in both Firefox 3.5.9 and IE8, it doesn't show up. IE8 tells me that "'matches' is not a valid XSLT or XPath function." Is this due to XSLT 2.0 not being supported, an...
Using Watir to regression test some changes: I want to 'click' a row in a typical old style web page menu, where the menu is a table of tables. In this particular example, the table cell contains the menu item, and the row, which only consists of the one cell, has an onclick handler. I thought I could
cell = browser.element_by_xpath("...