105 Topics

Member Avatar for
Member Avatar for Osagie_1

I have an xml structure : <Pages> <!--This is the root node--> <Home> <url>...</url> <menu> <item>Help</item> <item>About</item> <item>Contact</item> </menu> </Home> <Help> <url>...</url> <menu> <!--i need to select this if its parent(Help) is listed in Home/menu/item above--> <item>Business Help</item> <item>Web Help</item> <item>Tour Help</item> </menu> </Help> <About> <url>...</url> <menu> <!--And Or select …

0
141
Member Avatar for Charles_8

Have a heck of a time writing XPATH to parse this XML response. Source data is (removed a bunch to save the innocent: `<?xml version="1.0" encoding="UTF-8"?><env> <ProcessResponse> <message> <payLoad> <BillingXMLMessage> <Envelop>SITEINFORESPONSE</Envelop> <COMPONENT DATATYPE="FLDPARAMINFO" NAME="ACCOUNTINFO"> <FIELD DATATYPE="FLDSTRING" NAME="ServiceType">/service/ip</FIELD> <FIELD DATATYPE="FLDBOOLEAN" NAME="ReactivationFlag">false</FIELD>`' XPATH statement is `/env/ProcessResponse/message/payLoad/BillingXMLMessage/COMPONENT[1]/FIELD[@NAME='ServiceType']` Which only gets me `Element='<FIELD DATATYPE="FLDSTRING" …

Member Avatar for Charles_8
0
130
Member Avatar for Suvathipriya

The Input Xml is Below. <?xml version="1.0"?> <TABLE tableid="PLSW"> <CELL rowmerged="T" rowspan="2" > <Para >11<refint>AA</refint> <ext>BB</ext> </Para> </CELL> <CELL rowmerged="T" rowspan="2" > <Para >12<ext>BB</ext></Para> </CELL> <CELL rowmerged="F" rowspan="1" > <Para >13<refint>CC</refint></Para> </CELL> </TABLE> I need XPATH for the above Input XML.If any of one <Para>contains refint with some other tag(<ext>) …

0
119
Member Avatar for flebber

Hi What would be a good recommendation for a practical resources on using xml, xpath and xquery? By practical I mean. Accessing values, storing files, creating set queries on xml to create a feed to push data to other applications (eg ipython, rstudio, the Web) maintaining data integrity, and transformng …

Member Avatar for Mike Askew
0
364
Member Avatar for Osagie_1

i'am testing an xml structure: <Articles> ... <Article ID="333"> <author>Paul</author> <title>i hate xpath </title> <child1>bla</child1> <child2>blabla <subchild> <subsubchild DEEP = "Attribute"></subsubchild> //this is the value i wanna update and my nightmare </subchild> </child2> <child3>testing</child3> </Article> ... </Articles> what xpath expression will fetch and update (change) the subsubchild attrib node value …

Member Avatar for gusano79
0
209
Member Avatar for Osagie_1

i'am testing an xml structure: <Articles> ... <Article ID="333"> <author>Paul</author> <title>i hate xpath </title> <child1>bla</child1> <child2>blabla <subchild> <subsubchild DEEP = "Attribute"></subsubchild> //this is my nightmare </subchild> </child2> <child3>testing</child3> </Article> ... </Articles> what xpath expression will fetch and update the subsubchild attrib value ? i am mostly concerned with fetching and …

Member Avatar for Osagie_1
0
146
Member Avatar for Osagie_1

<Articles> <Article ID="111"> <author>Peter Paul</author> <pubDate>01/01/2015</pubDate> <Translations> <lang1>English</lang1> <lang2>French</lang2> <lang3>Arab</lang3> <lang3>Chinese</lang3> </Translations> </Article> <Article ID="222"> <author>Monkey Rice</author> <pubDate>01/01/2016</pubDate> <Translations> <lang1>English</lang1> </Translations> </Article> <Article ID="333"> <author>John Silas</author> <pubDate>01/01/2017</pubDate> <Translations> <lang1 country="england">English</lang1> <lang2 country="france">French</lang2> <lang3 country="china">Chinese</lang3> </Translations> </Article> </Articles> I want to select any attribute in the entire document (no matter the …

Member Avatar for mangel.murti
0
130
Member Avatar for Osagie_1

<Articles> <Article ID="111"> <author>Peter Paul</author> <pubDate>01/01/2015</pubDate> <Translations> <lang1>English</lang1> <lang2>French</lang2> <lang3>Arab</lang3> <lang3>Chinese</lang3> </Translations> </Article> <Article ID="222"> <author>Monkey Rice</author> <pubDate>01/01/2016</pubDate> <Translations> <lang1>English</lang1> </Translations> </Article> <Article ID="333"> <author>John Silas</author> <pubDate>01/01/2017</pubDate> <Translations> <lang1 country="england">English</lang1> <lang2 country="france">French</lang2> <lang3 country="china">Chinese</lang3> </Translations> </Article> </Articles> i want to update attribute value "england", as in: ... <Translations> ... <lang1 …

0
104
Member Avatar for sakis297

Hello!!! If I have this <bookstore> <book author="Tommy"> <title>Emma</title> </book> </bookstore> and I want to get the node, I know that I must write this. string au = "Tommy"; string query = String.Format("//bookstore/book[@author={0}]/title", au); Also, if I have this <bk:bookstore xmlns:bk="http://www.test.com/"> <book author="Tommy"> <title>Emma</title> </book> </bk:bookstore> and I want to …

0
113
Member Avatar for Ques

I have a process defined. I use XPath to refer to each activity in the process. Now, I wish to create instances of the activities and be able to refer to these instances. Also, I need to refer to something like start activity X when second instance of activity Y …

0
104
Member Avatar for Nagarajan_1

I have xml like this <mainProcedure> <proceduralStep> <proceduralStep> <proceduralStep> <proceduralStep> </proceduralStep> </proceduralStep> </proceduralStep> <proceduralStep> <proceduralStep> </proceduralStep> </proceduralStep> </proceduralStep> </mainProcedure> the child node name for mainProcedure node is all same and no attributes and text. i need to find out which proceduralStep node is clicked and its position.

Member Avatar for xml_looser
0
246
Member Avatar for Charles_8

Having a hell using XPATH to parse out the values from the XML below. Wondering if anyone can tell me what I'm doing wrong. <?xml version="1.0" encoding="UTF-8"?> <XML> <VARIABLES> <var name="LoginUUID" value="F85373F9-00C4-7982-E043-AB7412ACA458"/> <var name="FExists" value="0"/> <var name="NumFTokens" value="0"/> <var name="NumPTokens" value="9"/> <var name="purchaseOptions_Poductname1" value="500 MB"/> <var name="purchaseOptions_Poductvalue1" value="7"/> <var name="purchaseOptions_Poductpricevalue1" …

Member Avatar for Charles_8
0
150
Member Avatar for adam123456789

I can't figure out two expressions in xpath. Can someone help ? Here they are substring-after(substring-before(//ul[@id='biblio']/li[3], ']', '[')) //h2[normalize-space(string())='name']/preceding::h1[1]

Member Avatar for xml_looser
0
246
Member Avatar for Vishwanath_1

Hi, I am very new to this forum. I started learning XPath queries. Can anyone please assist me on how to get elements from an xml where it doesn't contains any root element. Thanks, Vishwanath

Member Avatar for xml_looser
0
1K
Member Avatar for de4ever
Member Avatar for Mike Askew
0
91
Member Avatar for PriteshP23

I would like to get name of Tilt and its value 30. I am not able to get the value of Tilt. Let me know if you have any idea. Thanks in advanced. XML File: <?xml version="1.0" encoding="UTF-8"?> -<Physical> <Catalog> </Catalog> -<Installed> -<Equipment> <Id>26</Id> <Ref>Tew12</Ref> -<Characteristic> <CharacteristicName>Height</CharacteristicName> <CharacteristicValue>160</CharacteristicValue> </Characteristic> -<Characteristic> …

Member Avatar for PriteshP23
0
2K
Member Avatar for barakros

hi I need some help. I have XML file with the folowing structure, and I wanted to know if there is a way to get some FLD nodes from a LIN Node in 1 XPATH command so I can get these values in 1 command. I need just the first …

Member Avatar for barakros
1
361
Member Avatar for Anark10n

Apologies if the title is bit confusing, had to keep it concise. Okay so the xml document looks like this <students> <student sid="S2208"> <fname>Ben</fname> <lname>Doe</lname> <scourses courseid="DSA" mode="full-time"/> <scourses courseid="INT" mode="part-time"/> </student> <students> <lecturers> <lecturer lid="L1101"> <fname>Dohn</fname> <lname>Joe</lname> <lcourses courseid="DSA"/> <lcourses courseid="INT"/> <lcourses courseid="ACT"/> </lecturer> <lecturers> Using the courseid attribute …

Member Avatar for Anark10n
0
196
Member Avatar for sritech97

Hi , I have an xml which is in the following format. <root> <x> <y> <uri>ssomeuri</uri> <date>2012-07-11T10:29:08+00:00</uri> </y> </x> <x> <y> <uri>ssomeuri2</uri> <date>2012-07-11T11:01:08+00:00</uri> </y> </x> </root> I wanted to get uris in the order of date. I am very new to xpath, can any body help me on this. the …

Member Avatar for Mike Askew
0
204
Member Avatar for abbelylee

i have a set of xml data from a database, i want to transform these data into a form that would conform to the target data. in the sense that the elements node would change and the text nodes will also be rearranged something like source <?xml version="1.0" encoding="UTF-8"?> <XMLCreators> …

Member Avatar for Mike Askew
0
229
Member Avatar for ZMike

If I hard code something into the conatins it works just fine valstring = "[contains(title,'Test')]"; However if I try and use contains against the xpath title and then use what was entered into a text box I haven't figured out how to do that. I'm sure it's something very simple …

Member Avatar for ZMike
0
143
Member Avatar for saneeha.nust

The following code line is working fine... XmlNode sslNode = appHostNode.SelectSingleNode("sites/site[@name = 'www.wow.com']/ftpServer/security/ssl"); Now I want to pass a variable instead of 'www.wow.com'... please guide how can I do it....

Member Avatar for saneeha.nust
0
82
Member Avatar for kenhans

I have an XML that looks something like this. It contains Subscriptions with some attributes. There are about 50 attributes to one subscription (only 3 listed here) and I'm trying to find out if there is a difference between one of the <cell>-elements in <values> and <oldValues>. If there is …

0
64
Member Avatar for ttback

This thread is related to my thread on Java's forum: [url]http://www.daniweb.com/software-development/java/threads/408377[/url] I don't mean to make multiple posts but I wasn't sure which of these forums this problem belongs to. I will focus on asking about the XPath part here. I have a problem to understand XPath when it comes …

0
106
Member Avatar for tungsten

Hello everyone, I am studying XML, XPath, XQuery, XSLT on my own and I want to sharpen my skills working on opensource projects. I am searching on Apache and other websites but the projects are too huge and in much advanced stage to start working on. I want to get …

Member Avatar for dknochen
0
234
Member Avatar for techyworld

Hii can you explain me what's the difference between xml,xsl,xslt,xpath???

0
76
Member Avatar for jaango123

Hi, This is going to be a xpath query. In the input xml, elemt 'e' is the fifth child of root element. Using the apply template and template match, am at element 'e'. How can i get the value, 5(fifth child), within the template, e. I tried using position, but …

Member Avatar for jaango123
0
269
Member Avatar for GabrielZiden

Hallo there. I have the following XML [CODE]<coordenadoria> <disciplina class="X" cod="AM123"> ...blablabla </disciplina> <disciplina class="X" cod="AM123"> ...blablabla </disciplina> </coordenadoria>[/CODE] Now, i have two kinds of 'selecs' i can do. I can choose a Discipline by its Cod, or its Cod+Class. using the following code, i can choose its Cod only. …

Member Avatar for dknochen
0
183
Member Avatar for Member #907589

I am a very new beginner in XPATH, so apologize if this is not the place to ask. I want to select the Child Table 2 within the table below using XPath. [CODE]<table width="100%" border="0" cellspacing="0" cellpadding="0"> //// MAIN TABLE <tr> <td colspan="2" style="padding-left: 2px;"> <table border=0 width=100% cellspacing=0> //// …

Member Avatar for Member #907589
0
128
Member Avatar for Stew007

I have the following XML... <TechnicalMeterDetails> <RemovedMeterRegisters MeterCategoryCode="RM067"> </RemovedMeterRegisters> <RemovedMeterRegisters MeterCategoryCode="RM066"> </RemovedMeterRegisters> <NewMeterRegisters MeterCategoryCode="RM068"> </NewMeterRegisters> <NewMeterRegisters MeterCategoryCode="RM067"> </NewMeterRegisters> </TechnicalMeterDetails> I want to check that the MeterCategoryCode value in the RemovedMeterRegisters segments is the same value in the NewMeterRegisters segments. In the above example the answer would be false. If RM068 …

Member Avatar for xml_looser
0
128
Member Avatar for anandunics

Hi All, <client> <description>KKR</description> <rits>Test</rits> <time_zone_code>US/Central</time_zone_code> <directory_code>Foler</directory_code> </client> I need to fetch the above and put it in the form HTML FORM. Note : Must make use of Xpath,(Identity Transformation)

Member Avatar for anandunics
0
225
Member Avatar for malk

Hi there, I need to be able to see and modify an xml value. I used to be able to do so using xpath when the xml structure was: [CODE]<root> <employeeA>jones</employeeA> <employeeB>smith</employeeB> </root>[/CODE] by using /root/employeeA/text() to get "jones" but now the xml structure has changed to the following: [CODE] …

Member Avatar for xml_looser
0
86
Member Avatar for dhudnall

Hello Folks, I currently have a problem with trying to assign values using an XPathNavigator object in InfoPath. What I am trying to do is to perform a simple copy and nothing appears to be working. I don't know if I am doing something wrong or the syntax is incorrect. …

Member Avatar for dhudnall
0
300
Member Avatar for f_atencia

Hi all, I'm fairly new to XML and XPath. I was wondering if someone could help me in understanding the following line of code and what element(s) it is pointing to: [CODE]<xsl:variable name="EmpPos" select="[COLOR="Green"]count(preceding-sibling::Employment)+1[/COLOR]"/>[/CODE] Any help is greatly appreciated.

Member Avatar for xml_looser
0
148
Member Avatar for redrose123

Hi, I have an XPATH expression which works in Firefox but not IE8. "//country/region[text()="London"]/../timeZone" The error message I get from IE8 is " Message: .. may not appear to the right of / or // or be used with |." Thanks, Redrose123

Member Avatar for mrame
0
76
Member Avatar for gnzxzx

Below is an xpath that works. It returns all the values of the [U][B]value[/B][/U] attribute of the OutputField tag: [CODE] //Satellite/multidataset/file[contains(@name, '311multi')]/Data/DriftAnalysis[contains(@name, '311')]/Metric[@name='Detail' and @type='Overlap']/Element[@metrictype='Overlap']/OutputField[@name='Cleared']/@value [/CODE] But when I try to sum the returned values of the [U][B]value[/B][/U] attribute like the example below I get the error "Expression must evaluate …

Member Avatar for mrame
0
873
Member Avatar for fugmag

Hello, I am trying to validate a response from a webservice that contains 3 tables with the same name: [CODE] ... <SUBTABLE3> content </SUBTABLE3> ... <SUBTABLE3> content </SUBTABLE3> ... <SUBTABLE3> content </SUBTABLE3> ... [/CODE] I am using the example on: [url]http://www.soapui.org/Functional-Testing/xpath-and-xquery-assertions.html[/url] The problem, the way I see it is when …

Member Avatar for fugmag
0
639
Member Avatar for gleb

I have read lots of Xpath tutorials but don't know how to query a xml document. So I have an XML document and a query like this /bookstore/book/title How do I conduct the search? Sorry if this question is badly phrased but I am very confused.

Member Avatar for iceandrews
0
120
Member Avatar for soumya_mjmder

Hi, i have the folwing xml, i want to compare the dates Modifyts and ActualDate using XPATH and XSLT and print the date which is newer.Can you please help me regarding this. [CODE]<ABC> <InputDocument> <OrderList LastOrderHeaderKey="2011013111595948350" LastRecordSet="Y" ReadFromHistory="" TotalOrderList="1"> <Order DocumentType="0001" EnterpriseCode="XYZ" Modifyts="2011-02-14T13:53:04+00:00" OrderNo="Y100000042"/> </OrderList> </InputDocument> <EnvironmentDocument> <Order DocumentType="0001" EnterpriseCode="XYZ" …

Member Avatar for soumya_mjmder
0
252
Member Avatar for iskinner

I have XML data where information in nodes relate to other nodes. I am trying to figure out how to generate output based on these relationships. XML sample <gedcom> <indi id="@I001"> <famc>@F002@</famc> </indi> ... <fam id="@F002"> <husb>@I005@</husb> <wife>@I007@</wife> </fam> </gedcom> XSLT sample <xsl:template match="/"> <xsl:apply-templates select="/gedcom/indi[@id='@I001@']"/> </xsl:template> <xsl:template match="indi"> <xsl:value-of …

Member Avatar for xml_looser
0
1K
Member Avatar for zizuno

I have been told by a number of people to use xpath instead of regex for some of my regex searches. What advantages does xpath provide over regex? I can't find a webpage that says that. Been through over 10 pages of search so far.

Member Avatar for richieking
0
625
Member Avatar for jaango123

Hi all, [code=xml]<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ABC="http://www.ABCSPGM.DSUPFREQ.Request.com"> <soapenv:Header> <ABC:ABCSHeader> <ID>xyz</ID> <ConsumerTransactionId>5667</ConsumerTransactionId> </ABC:ABCSHeader> </soapenv:Header> <soapenv:Body> <ABC:ABCSPGMOperation> <ABC:req> <ABC:plastic_number>1234</ABC:plastic_number> </ABC:req> </ABC:ABCSPGMOperation> </soapenv:Body> </soapenv:Envelope>[/code] The above is my input passed by the client. How can I extract the values within the tag 'ID','ConsumerTransactionId' and 'ABC:plastic_number' using simple xpath expressions. I know that if we give …

Member Avatar for iceandrews
0
119
Member Avatar for weloki

I'm using XSLT to try to grab content from an html page. I want to select all the <p> tags but exclude all the <li> tags. There is one page where the li tags are not within any of the p tags. For this page, how can I select all …

Member Avatar for weloki
0
86
Member Avatar for TheBrenda

What to create XPath(s) that I can can use in a FOR loop to retrieve each of the <app> and <coapp> fname & mname. Want my result to be "1 - Danny L", "2 - Wendy R", "3 - Brenda", "4 - Tim G". I have played with this XPath …

Member Avatar for iceandrews
0
343
Member Avatar for achava

Another total Nuby collection. I have an xml file from which I wish to eliminate all elements that have any attributes at all. All I really need to do is eliminate the contents of the attribute. How do I do this? My plan is to start with <xsl:template match="Contains an …

Member Avatar for fpmurphy
0
146
Member Avatar for smegal

Hi, I have an xml file that has the same tag name for different categories of data. Below is an example. I would like to create an xpath to extract each data category. For example Age is the 4th tag. So I would need the xpath script to navigate to …

Member Avatar for iceandrews
0
111
Member Avatar for luofeiyu

there is an html file [CODE]<table> <tr> <td>ok <strong>Sep 10</strong> | <a href="ttt">Oct 10</a> | <a href="kkk">Dec 10</a> <table> <tr> <td> 123 </td> <td> 567 </td> </tr> </table> </td> </tr> </table>[/CODE] when i open it with firefox,the output is : ok Sep 10 | Oct 10 | Dec 10 123 …

Member Avatar for iceandrews
-1
89
Member Avatar for Nith01

Hello, I'm trying to scrape a website using XPath and am running into a little trouble. This is the first time I've played with XPath so I'm a little rusty :/ The relevant source code of the website I'm trying to scrape is: [CODE=html]<span id="ctl00_ContentPlaceHolder1_lblEvents"> <div class="contentmain"> <div class="textArea1"> <strong>14 …

Member Avatar for Parthmishr
0
105
Member Avatar for dsottimano

Hi, I was hoping someone knows the right syntax to extract elements of xml through Google docs spreadsheets using some xpath statements. Google has very limited documentation, and basic xpath syntax doesn't work with Google docs. I found a quick example on youtube but other than that I'm lost. Just …

0
80
Member Avatar for mvee

Hello - I am very new to xml files and xpath. I have 4 multiselect dropdowns all using the same xml datasource. Each dropdown is based on attributes of the same tag. I would like to make them cascade, but I can only figure out how to do it by …

0
55

The End.