105 Topics

Member Avatar for
Member Avatar for ermercado

hi, using the sample xml below: <hdr> <sect role="para" label="1234"> <legref>asdf</legref> <cite role="com">abc</cite> <cite role="rg">RTY 08</cite> <cite role="rg">SDF 05</cite> <othertag>some textdata here <cite role="rg">SXF 05</cite> </othertag> </sect> <sect role="para" label="2345"> <cite role="com">xyz</cite> <cite role="rg">WER 10</cite> <cite role="rg">TRS 10</cite> <cite role="rg">WER 10</cite> <legref>qwert</legref> </sect> </hdr> need to extract the label attribute …

Member Avatar for ermercado
0
810
Member Avatar for rolsen

Dear all, Another beginner seeks assistance with XSLT and XPATH ;-) This is my XML source: [CODE] <?xml version="1.0" encoding="UTF-8" ?> <report xsi:schemaLocation="http://www.callassoftware.com/namespace/pi4 pi4_results_schema.xsd" xmlns="http://www.callassoftware.com/namespace/pi4" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <profile_info > </profile_info> <results> <hits rule_id="RUL1" severity="Error"> <hit type="Image" page="PAG1"> </hit> <hit type="Image" page="PAG2"> <imagestate image_id="IMG30" v_ppi="127.0" h_ppi="127.0"></imagestate> </hit> </hits> </results> </report> [/CODE] I …

Member Avatar for rolsen
0
153
Member Avatar for ajwei810192

Hi, I wonder if anyone on this list has tried to mix numerical variable, such as 1, 2,3 within an xpath expression. [CODE]songList = document.SelectNodes("/music_songs/song[category='" & drop1.SelectedItem.Text & "'][item_number_first<=position()<=item_number_last]") [/CODE] For some reason, item_number_first and item_number_last appear to have no value in the above code snippet, when they do have …

Member Avatar for ajwei810192
0
131
Member Avatar for ajwei810192

Hi, I have an XML snippet as in the following: [CODE]<music_songs> <song> <title>(I Just) Died In Your Arms</title> <category>Rock</category> <album>80 Popular Hits</album> <artist>Cutting Crew</artist> <date added="03-24-2009"/> </song> </music_songs>[/CODE] Thiis is one of the songs out of 5 categories I have, and currently I use XPath expression as in the following: …

Member Avatar for ajwei810192
0
6K
Member Avatar for spectre1983

Hi all, I'm a bit of an XPath noob and I'd be much obliged if you'd point me in the right direction here. I want to select the first <product> in the source that has the child node <name> = 'bread' The expression below yields the correct naswer but I'm …

Member Avatar for iceandrews
0
123
Member Avatar for Anish Vatsya

I have one alias file which is acting as a wraper to XML. <Alias name='Type'> <Xpath>@subType</Xpath> </Alias> generally this return MEConsumed or MEResource. I want the behaviour that if @subType=MEConsumed then it should return CON and when @subType=MEResource then it should return "REF". Help me with this .. i am …

Member Avatar for Anish Vatsya
0
154
Member Avatar for arabgogs

Hi there, I am hoping someone can help, I have an large XML structure which I am attempting to interrogate. My structure(problem) is as follows <BigStructure> <Structure myNumber="1003"> <Structures> <myMap> <Point ID="1"> <Opt>THE</Opt> <Next>2</Next> </Point> <Point ID="2"> <Opt>ONE</Opt> <Next>2</Next> </Point> </myMap> <myMap> <Point ID="1"> <Opt>THE</Opt> <Next>2</Next> </Point> <Point ID="2"> <Opt>THIS</Opt> …

Member Avatar for arabgogs
0
112
Member Avatar for guocnc

I create an object of Microsoft.xmlDOM. load a xml file(validation no error). and objXMLDoc.setProperty "SelectionLanguage", "XPath" Then use Set NodeList = objXMLDoc.getElementsByTagName("appointment") to successfully retrieve a list of nodes with tagName "appointment" However, when I change the following code Set NodeList = objXMLDoc.selectNodes("//appointment") to hope to retrieve the same information, …

0
51
Member Avatar for Broodmdh

I am attempting to merge two XML documents (using Pentaho Kettle), and I'm having trouble with my XPATH statement. In the first XML, I have a list of users and their user id's. In the second XML, I have a list of projects, each with an id that corresponds to …

Member Avatar for varun0703
0
128
Member Avatar for some_one_

Hi, Need some guidance as this is new territory for me. I have an XML/XMI file representing a UML diagram. I need to transform it into a file with a different XML structure. I believe I can use either XSLT, XPath, or XQuery to achieve this... or maybe something else …

Member Avatar for rrusin
0
94
Member Avatar for rajad2010

Hi guys, I've got a data scraping script that is not picking few html elements/fields that I need. I can't get the following elements: product title price and specification It could be that the xpath is not correct since the website has a lots of div/tables without any id or …

Member Avatar for rajad2010
0
1K
Member Avatar for dbratshpis

I want my xpath query to return something like: customerName=... id=... customField=.... regardless whether those nodes exist in my xml: [CODE]<Begin> <CustomerRet> <customerName>Jack</customerName> <customerId>1</customerId> <customField>A</customField> </CustomerRet> <CustomerRet> <customerName>Jack</customerName> <customerId>1</customerId> </CustomerRet> </Begin>[/CODE] How do I go about writing my expression? I tried using concat but it's not working for me. /Begin/CustomRet/concat('customerName=',customerName) …

Member Avatar for xml_looser
0
101
Member Avatar for longbart

Hai all, I have the following problem to solve: The users of my application can specify an xpath like e.g. format-date(current-date(),'[D]/[M]/[Y]', 'en', (), ()) this xpath is caught in an xslt file as just being a string (the user could also have typed in a string and then I need …

Member Avatar for longbart
0
86
Member Avatar for extkml

I have orders.xml like the following [CODE]<?xml version="1.0" encoding="UTF-8" standalone="no"?> <orders> <order orderDate="1/1/2009" orderNo="1"> <customer id="nnghiem" name="nguyen nghiem"/> <item id="item-1" price="25000" quantity="0"/> <item id="item-2" price="22000" quantity="3"/> </order> <order orderDate="2/2/2009" orderNo="2"> <customer id="lp" name="lampard"/> <item id="item-1" price="25000" quantity="2"/> <item id="item-2" price="22000" quantity="8"/> </order> <order orderDate="3/3/2007" orderNo="3"> <customer id="nnghiem" name="nguyen nghiem"/> <item …

Member Avatar for extkml
0
205
Member Avatar for hangon

I have an xml like below <PO> <ITEM> <ID>1000</ID> <PRICE>10</PRICE> </ITEM> <ITEM> <ID>1000</ID> <PRICE>10</PRICE> </ITEM> <ITEM> <ID>1001</ID> <PRICE>10</PRICE> </ITEM> <ITEM> <ID>1001</ID> <PRICE>10</PRICE> </ITEM> </PO> I want an xpath that will get only ID = 1000 and the output should be like below <PO> <ITEM> <ID>1000</ID> <PRICE>10</PRICE> </ITEM> <ITEM> <ID>1000</ID> <PRICE>10</PRICE> …

Member Avatar for fpmurphy
0
128
Member Avatar for veboit

Hi All, I am new to Xpath so this is a very basic question. I have a date variable I want compare that variable to current date. example: my_date > current_date then print "previous date" how to write this in xpath? thanks

Member Avatar for veboit
0
125
Member Avatar for john2029

Hi All, I want to retrive element values from Xml Document which contains the string which i am passing. For example : I want to retrive all the element values which has word 'Sales' . How should i write XPath expression ? Any example will be appriciated. Thanks John

Member Avatar for fpmurphy
0
83
Member Avatar for csplrj

I have a HTML document in which there is a <td> tag In this td tag the TextContent is equal to "Type" It is not neccessary that the td tag directly has content,it may have content in the subtags. The "Type" stuff may be enclosed in between the spaces What …

Member Avatar for fpmurphy
-1
150
Member Avatar for rototem

Hello, I have to parse an xml document that contains names of sports teams , but these sport teams tags are included in league tags , so inside a league can be a variable number of teams (1, 2 etc.). Like this : <league> <name>NCAA</name> <team> <name>Akron </name> <decimalodds>2</decimalodds> </team> …

Member Avatar for rototem
-1
101
Member Avatar for yitzhak

I'm new to xpath.. probably very simple, but I haven't been able to figure it out. I'm working with the following xml structure: [ICODE]<item dateExpires="0" doNotPublish="0" manufacturer="" productDetailURL="" id="BKIT1009" type="2"> <pricing price="29.99" retailMarkup="0" retailPrice="0" saleMarkDown="0" salePrice="0" saleType="0" stockPrice="29.99" taxableNational="1" taxableRegional="1"/> </availability> <accessoryGroup>misc</accessoryGroup> <name>2 Piece Kit</name> <briefDescription>2 Piece Kit</briefDescription> <description>2 Piece …

Member Avatar for yitzhak
-1
132
Member Avatar for iamakimmer

hi, if I have a variable such as [CODE]<xsl:variable name="name" select="name" />[/CODE] and I want to reach somewhere in xpath using this variable as the attribute, such as: [CODE]sum(/document/doc/@[B]$name[/B])[/CODE] this query doesn't work. is there anyway I can reach this path without knowing that the attribute name?

-1
62
Member Avatar for urs.karuna1218

Hi, How can I find the number of nodes in the node-set. Here in the below document I want to find the number of nodes in DocumentList element. Am new to Xpath. Can anyone please help me out? <?xml version="1.0" encoding="UTF-8"?> <ProcessData> <SessionBeginTime>2009-07-14 13:24:28.218</SessionBeginTime> <ServerResponse> <Code>226</Code> <Text>226 Transfer OK</Text> </ServerResponse> …

Member Avatar for urs.karuna1218
0
174
Member Avatar for swarupa_shet

<CCAddMFADetailsRequest> <accounts> <tp_account> <tp_account_id> 28 </tp_account_id> <questions> <question> <text>Enter your first pet's name:</text> <answer>tiger</answer> </question> <question> <text>Enter your first pet's name2:</text> <answer>tiger2</answer> </question> <question> <text>Enter your first pet's name3:</text> <answer>tiger3</answer> </question> </questions> </tp_account> <tp_account> <tp_account_id> 29 </tp_account_id> <questions> <question> <text>Enter your 9</text> <answer>dsftiger</answer> </question> </questions> </tp_account> </accounts> </CCAddMFADetailsRequest> How to …

Member Avatar for xml_looser
0
192
Member Avatar for urs.karuna1218

Hi Folks, Can anyone explain me whether we can use multiple predicates in the path expression. In the below path, // indicates searching for the node in XML document irrespective of its position, but I didn't understand why 'starts-with' function is placed in [] brackets. Even though it's working fine, …

Member Avatar for urs.karuna1218
0
173
Member Avatar for an0n3m0us

I am trying to extract keywords and image urls from this xml document (also attached) [URL="http://www.powerhousemuseum.com/collection/database/opensearch/new_tlf_feed.php?start=1&show=3"]http://www.powerhousemuseum.com/collection/database/opensearch/new_tlf_feed.php?start=1&show=3[/URL] It contains 3 /rss/channel/item elements each containing one /general element each general element contains many keyword elements each of which has a string element who's value i want. I can get XPathNodeIterator on /rss/channel/item …

0
71
Member Avatar for Jess Pear

Hi to all! I am pretty new to Xpath and I am quite lost. I use Stylus Studio Prof for all things related to XML, and I've been struggling with this apparently simple question for a few days. If I have something like: [code] <sales> <person> <id> <tag>2345X</tag> <name>Doe, Joe</name> …

Member Avatar for xml_looser
0
127
Member Avatar for MasterJon

I'm a beginner. I'm learning XPath. This is the sample structure: [code] <AAA> <BBB/> <CCC/> <DDD/> <AAA/> <BBB/> </DDD> <div class="some"> <AAA/> <BBB/> <div id="special"> <AAA/> </div> <div style="clear: both;"/> <hr/> <div> text </div> <div> text </div> <div> text </div> <hr/> <div> text </div> <div> text </div> <DDD/> <EEE/> </div> …

Member Avatar for fpmurphy
0
1K
Member Avatar for Swijr

I have a task where I'm transforming a response like this: [code] <Names> <Name> <First></First> <Last></Last> <Middle></Middle> </Name> <Name> <First></First> <Last></Last> <Middle></Middle> </Name> </Names> [/code] But I have to format it into nodes like this: [code] <name_first_1></name_first_1> <name_last_1></name_last_1> <name_middle_1></name_middle_1> <name_first_2></name_first_2> <name_last_2></name_last_2> <name_middle_2></name_middle_2> [/code] So I wanted to use position() to …

Member Avatar for Swijr
0
107
Member Avatar for ashoo

Today is my first venture into Xpath.. I have a table that looks like this Date Level 1 Level 2 05/20/2009 Value1 05/21/2009 05/27/2009 Value2 Whenever date for value1 in level 1 changes date for value 2 in level 2 must change consistently by a week. that is if date …

Member Avatar for fpmurphy
0
98
Member Avatar for bovlb

I'm trying to use XPath/XQuery to identify HTML elements. In particular, I want to be able to match elements where the "class" attribute contains a specific token. As I understand it, "class" is now defined as NMTOKENS, which means it should be treated as list-valued. So does that mean that …

0
63
Member Avatar for bigtiny

Hi all, I have a pretty specialized problem/question I think. Let me start by saying that I'm dealing with a bunch of new stuff and trying to learn as I go. I just heard of XPATH the other day, and I'm using it in a pretty restricted context (more about …

0
70
Member Avatar for TheBrenda

I have a grid where you input the XPath to retrieve the values from an XML file. Client wants the last four of the Credit Card. I have come up with the following XPath Substring statement, but my usual XPath statements start with // and in the code I use …

Member Avatar for msbalaji
0
150
Member Avatar for superchris

Hi there, I'm trying to understand how XPath works, I haven't been using it for that long :) I want to be able to select all the siblings of a specified node. For example; [CODE]<folder> <page id="1" /> <page id="2" /> <page id="3" /> <folder id="4"> <page id="5" /> <page …

Member Avatar for xml_looser
0
176
Member Avatar for fia

i am new to xpath qurey. i want some how to get these nodes. <?xml version="1.0" encoding="UTF-8"?> <uml:Model name="Studentmanagementsystem" xmi:id="e5i21gSGAqAERwCq" xmi:version="2.1" xmlns:uml="http://www.eclipse.org/uml2/2.0.0/UML" xmlns:xmi="http://schema.omg.org/spec/XMI/2.1"> <xmi:Documentation xmi:Exporter="Visual Paradigm for UML" xmi:ExporterVersion="6.3.0"/> <packagedElement isAbstract="false" isActive="false" isLeaf="false" name="User" visibility="public" xmi:id="lELO1gSGAqAERwOt" xmi:type="uml:Class"> <xmi:Extension xmi:Extender="Visual Paradigm for UML"> <isRoot xmi:value="false"/> <modelType value="Class"/> <businessModel xmi:value="false"/> </xmi:Extension> <ownedAttribute …

Member Avatar for thoughtcoder
0
157
Member Avatar for GDICommander

Hi, everyone! At work, I'm having problems to run a XPath using the selectNodeList() method from Xalan. The XPath I want to execute is: //pam:message//prism:coverDate The error message I have is: The prefix 'pam' is not declared. expression = '//pam:message//prism:startingPage' Remaining tokens are: ('/' '/'). I have searched on the …

Member Avatar for GDICommander
0
152
Member Avatar for a_n_n_a_m

hi! i'm relatively new to xpath and im trying to include a search facility in my website which searched through my xml file. the format of the xml file is as follows: [CODE=xml] <years> <year> <life> <title>...title...</title> <full>...full text... </full> </life> </year> ..... </years> [/CODE] i need to retrieve all …

Member Avatar for Narue
0
256
Member Avatar for demonic_death

I have this xml snippet: <book id="bk102"> <author name= "Smith, john" > <title>Test book</title> <genre>Other</genre> <price>30.00</price> <publish_date>2003-10-01</publish_date> </author> </book> and I am writing an xpath parser this way: //book[@id='bk102']//book[@genre ='Other']//book[price=30.00] I know that I can get it by using just the first query, ( //book[@id='bk102'] ) but what if I …

Member Avatar for Narue
0
100
Member Avatar for vertig

Hi all, I am looking for the correct Xpath expression to add several new elements into a given sequence of elements. For example, If my sequence is the following list of books [url]http://www.w3schools.com/Xpath/books.xml[/url] With which operator / function could I add to this list of books an additional book ? …

0
53
Member Avatar for scott_rider

Is there a method I can grab parent/grandparent nodes? The examples I have found appear to use only xpath statements to select nodes. Some of my failed attempts: /table/tr/td/b/font[self::text()="Nohup Files"] /table/descendant::font[self::text()="Nohup Files"] <table> <tr> <td><b><font>Nohup Files</font></b></td> </tr> </table>

Member Avatar for Ezzaral
0
112
Member Avatar for scott_rider

I want to get the table node where its decendent node="Nohup Files". What I have so far is table/descendant::font[self::text()="Nohup Files"] table/tr/td/b/font[self::text()="Nohup Files"] but neither works. <table> <tr> <td><b><font>Nohup Files</font></b></td> </tr> </table>

Member Avatar for scott_rider
0
148
Member Avatar for pushparaju

Hi Guys, How can I convert XPath without namespace and prefix to the XPath with namespace and prefix. For Eg: I have a XML file like this <?xml version="1.0" encoding="UTF-8"?> <ns0:mt_test xmlns:ns0="http://hvpar"> <RECORD1> <FIELD1>1</FIELD1> <FIELD2>2</FIELD2> </RECORD1> </ns0:mt_test> and I need to write XPath Expression to check whether FIELD1 contains value …

Member Avatar for fpmurphy
0
101
Member Avatar for Andyyy

Hello Developers, [code] <p class="abc-srch-Metadata"><span class="abc-srch-URL"><a href="http://www.abc.ac.uk/pub/xyz.aspx?e=20" id="CSR_U_2" title="http://www.abclondon.ac.uk/pub/xyz.aspx?e=20" dir="ltr">http://www.abclondon.ac.uk/pub/xyz.aspx?e=20</a></span> - 13KB </p><span class="abc-srch-Icon"><a href="http://www.abclondon.ac.uk/pub/pqr.aspx" id="CSR_IMG_3" title="http://www.abclondon.ac.uk/pub/pqr.aspx"><img align="absmiddle" src="/_layouts/images/html16.gif" border="0" alt="File with extension: aspx"></a></span><span class="abc-srch-Title"><a href="http://www.abclondon.ac.uk/pub/xyz.aspx" title="http://www.abclondon.ac.uk/pub/xyz.aspx">ABC Publications Listing </a><br></span><div class="abc-srch-Description">Alcohol and the <b>lime</b> in perspective [/code] Can any one help me out with the xpath for retreiving title "ABC …

Member Avatar for mlohokare
0
170
Member Avatar for kaprasanna

Hello, Is it possible to write xpath expressions that will query a web server's web.xml like this one : [CODE] <web-app> <display-name>My Application</display-name> <!-- Standard Action Servlet Configuration (with debugging) --> <servlet> <servlet-name>TestServlet</servlet-name> <servlet-class>com.mycompany.MyServlet</servlet-class> </servlet> <!-- Standard Action Servlet Mapping --> <servlet-mapping> <servlet-name>TestServlet</servlet-name> <url-pattern>/first</url-pattern> </servlet-mapping> </web-app> [/CODE] I would want …

Member Avatar for fpmurphy
0
117
Member Avatar for kissmyawesome

I've been scratching my head trying to figure this out. Basically I am trying io impliment the CSS selector ":only-of-type" in XPath 1. The selector should only pick elements that have no other siblings of the same type. Its simple enough if I know the type ahead of time. e.g. …

Member Avatar for fpmurphy
0
90
Member Avatar for Softwarez

I have the following XML: <?xml version = "1.0"?> <transactions> <transaction date = "05/22/2000" id = "0122"> <from account = "100392"/> <to account = "203921"/> <amount currency = "USD">15</amount> </transaction> <transaction date = "06/01/2000" id = "0129"> <from account = "203921"/> <to account = "877521"/> <amount currency = "USD">4800</amount> </transaction> …

Member Avatar for fpmurphy
0
139
Member Avatar for rickya100

Hi there, I am wondering if anyone here could tell me where I am going wrong with my XPath query. What I am using is below and is supposed to return me the URL attribute of the last Image element under the AccommodationSegment element. The if statement keeps getting run …

0
72
Member Avatar for JohnRodey

I have XPATH statements that are written to work with data based on an older schema, let's call it schema 1.0. Now I want to use those same XPATH statements on data that written based on a newer schema (2.0). Though the two schemas are different there is a close …

0
62
Member Avatar for lupin99

hi everyone... i'm a newbie to xpath and i don't know how to extract all the ToolAlarm nodes from my xml file... here's the xml file and code snippet: <?xml version="1.0" encoding="utf-8" ?> <ToolConfigurations> <ToolType name ="EQP1"> <ToolAlarms> <ToolAlarm name = "AIR PRESSURE LOW"/> <ToolAlarm name = "FALSE ALARM"/> <ToolAlarm …

Member Avatar for techtix
0
163
Member Avatar for karhong

Hi, I'm new to xpath. I have some question I dont know how to do it.. I've googled about it and i dont see any solution. Question: I wanted to do a math calculation.(this i know how to do) but then i wanted it to display it out using my …

Member Avatar for Member #344710
0
126
Member Avatar for Mats_swe

Hi, I have a problem extracting the information I want from an EMF-model. I have created a meta-Model and from the model (.cim), expressed in XML, I want to generate code in the form of .mof (Managed Object Format). I therefore use XPath to extract information from the model and …

Member Avatar for indrajeet.verma
0
179

The End.