Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.text.xml > #850

xpath deeper level but considering siblings

Newsgroups comp.text.xml
Date 2016-02-16 02:23 -0800
Message-ID <7e34c25e-3db7-4eaa-a4a1-94779ff87b2a@googlegroups.com> (permalink)
Subject xpath deeper level but considering siblings
From frank67x@gmail.com

Show all headers | View raw


Presume following xml:

<root>
  <main>
    <info name='info_1'>value_1a</info>
    <info name='info_2'>value_2a</info>
    <info name='info_3'>value_3a</info>
    <info name='info_4'>value_4a</info>
    <data>
      <data1>hello</data1>
      <data2>world</data2>
    </data>
  </main>
  <main>
    <info name='info_1'>value_1b</info>
    <info name='info_2'>value_2b</info>
    <info name='info_3'>value_3b</info>
    <info name='info_4'>value_4b</info>
    <data>
      <data1>bye</data1>
      <data2>again</data2>
    </data>
  </main>
</root>

What's the xpath to retrieve the value of 
  /root/main/data/data1 
of the 1st section, where sibling 
  /root/main/info[@name='info1'] has value 'value_1a'?

Back to comp.text.xml | Previous | NextNext in thread | Find similar


Thread

xpath deeper level but considering siblings frank67x@gmail.com - 2016-02-16 02:23 -0800
  Re: xpath deeper level but considering siblings richard@cogsci.ed.ac.uk (Richard Tobin) - 2016-02-16 16:21 +0000
    Re: xpath deeper level but considering siblings frank67x@gmail.com - 2016-02-16 09:16 -0800
      Re: xpath deeper level but considering siblings richard@cogsci.ed.ac.uk (Richard Tobin) - 2016-02-17 01:01 +0000
        Re: xpath deeper level but considering siblings frank67x@gmail.com - 2016-02-17 00:07 -0800
        Re: xpath deeper level but considering siblings Peter Flynn <peter@silmaril.ie> - 2016-02-21 15:41 +0000

csiph-web