How to use XPath to find a node using just an attribute value [duplicate]XPath selecting a node with some attribute value equals to some other node's attribute valuexpath: find a node that has a given attribute whose value contains a stringSelectSingleNode returning null for known good xml node path using XPathUsing XPath, How do I select a node based on its text content and value of an attribute?XPath contains(text(),'some string') doesn't work when used with node with more than one Text subnodeGetting attribute using XPathExtract value of attribute node via XPathExtract nodes based on attribute and node valuesXSLT to update an attribute given just the new value and XPath to the attributeI need to select the attribute given of a node that have an attribute named TypeCode with a value of REF, i can't find the right XPath queryXPath select nodes with attribute names

Would there be balance issues if I allowed opportunity attacks against any creature, not just hostile ones?

Why does this regexpatch command only work once, not twice?

Playing boules... IN SPACE!

Ways you can end up paying interest on a credit card if you pay the full amount back in due time

How to fit Schwalbe Marathon Plus 28-622 on 622-16 rim

Why KVM VPS is slower then OPENVZ

If the UK government illegally doesn't ask for article 50 extension, can parliament do it instead?

Mathematica not simplifying rational powers in complex expressions

Function of the separated, individual solar cells on Telstar 1 and 2? Why were they "special"?

Why are my split equations aligned to right by default?

Punishment in pacifist society

Is torque as fundamental a concept as force?

Why do we need explainable AI?

What is a "fat pointer" in Rust?

When do we use "no women" instead of "no woman"?

Why do modes sound so different, although they are basically the same as a mode of another scale?

Received email from ISP saying one of my devices has malware

Babies - are we talking about their birth, arrival or delivery?

How does the search space affect the speed of an ILP solver?

To which country did MiGs in Top Gun belong?

In mathematics is there a substitution that is "different" from Vieta's substitution to solve the cubic equation?

Calculate Landau's function

Can a Centaur utilize a mount?

Why doesn’t this recursive CTE with a parameter use an index when it does with a literal?



How to use XPath to find a node using just an attribute value [duplicate]


XPath selecting a node with some attribute value equals to some other node's attribute valuexpath: find a node that has a given attribute whose value contains a stringSelectSingleNode returning null for known good xml node path using XPathUsing XPath, How do I select a node based on its text content and value of an attribute?XPath contains(text(),'some string') doesn't work when used with node with more than one Text subnodeGetting attribute using XPathExtract value of attribute node via XPathExtract nodes based on attribute and node valuesXSLT to update an attribute given just the new value and XPath to the attributeI need to select the attribute given of a node that have an attribute named TypeCode with a value of REF, i can't find the right XPath queryXPath select nodes with attribute names






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








0
















This question already has an answer here:



  • XPath selecting a node with some attribute value equals to some other node's attribute value [closed]

    2 answers



If I have a (fragment of) xml like this:



<flowreferences>
<ref>123</ref>
<ref>563</ref>
<ref>902</ref>
<ref>674</ref>
<ref>295</ref>
<ref>887</ref>
<ref>371</ref>
</flowreferences>
<object1 id="123">
......
</object1>
<object1 id="563">
......
</object2>
<object2 id="887">
......
</object2>
<object3 id="674">
......
</object3>
<object4 id="295">
......
</object4>
<object5 id="907">
......
</object5>
<object6 id="371">
......
</object6>


Is there a Xpath query to return the object node given JUST the attribute value? In other words, if I know the id value (907), how do I find the object5 node?










share|improve this question














marked as duplicate by Kirill Polishchuk xml
Users with the  xml badge can single-handedly close xml questions as duplicates and reopen them as needed.

StackExchange.ready(function()
if (StackExchange.options.isMobile) return;

$('.dupe-hammer-message-hover:not(.hover-bound)').each(function()
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');

$hover.hover(
function()
$hover.showInfoMessage('',
messageElement: $msg.clone().show(),
transient: false,
position: my: 'bottom left', at: 'top center', offsetTop: -7 ,
dismissable: false,
relativeToBody: true
);
,
function()
StackExchange.helpers.removeMessages();

);
);
);
Mar 28 at 2:23


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.





migrated from superuser.com Mar 28 at 1:44


This question came from our site for computer enthusiasts and power users.

























    0
















    This question already has an answer here:



    • XPath selecting a node with some attribute value equals to some other node's attribute value [closed]

      2 answers



    If I have a (fragment of) xml like this:



    <flowreferences>
    <ref>123</ref>
    <ref>563</ref>
    <ref>902</ref>
    <ref>674</ref>
    <ref>295</ref>
    <ref>887</ref>
    <ref>371</ref>
    </flowreferences>
    <object1 id="123">
    ......
    </object1>
    <object1 id="563">
    ......
    </object2>
    <object2 id="887">
    ......
    </object2>
    <object3 id="674">
    ......
    </object3>
    <object4 id="295">
    ......
    </object4>
    <object5 id="907">
    ......
    </object5>
    <object6 id="371">
    ......
    </object6>


    Is there a Xpath query to return the object node given JUST the attribute value? In other words, if I know the id value (907), how do I find the object5 node?










    share|improve this question














    marked as duplicate by Kirill Polishchuk xml
    Users with the  xml badge can single-handedly close xml questions as duplicates and reopen them as needed.

    StackExchange.ready(function()
    if (StackExchange.options.isMobile) return;

    $('.dupe-hammer-message-hover:not(.hover-bound)').each(function()
    var $hover = $(this).addClass('hover-bound'),
    $msg = $hover.siblings('.dupe-hammer-message');

    $hover.hover(
    function()
    $hover.showInfoMessage('',
    messageElement: $msg.clone().show(),
    transient: false,
    position: my: 'bottom left', at: 'top center', offsetTop: -7 ,
    dismissable: false,
    relativeToBody: true
    );
    ,
    function()
    StackExchange.helpers.removeMessages();

    );
    );
    );
    Mar 28 at 2:23


    This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.





    migrated from superuser.com Mar 28 at 1:44


    This question came from our site for computer enthusiasts and power users.





















      0












      0








      0









      This question already has an answer here:



      • XPath selecting a node with some attribute value equals to some other node's attribute value [closed]

        2 answers



      If I have a (fragment of) xml like this:



      <flowreferences>
      <ref>123</ref>
      <ref>563</ref>
      <ref>902</ref>
      <ref>674</ref>
      <ref>295</ref>
      <ref>887</ref>
      <ref>371</ref>
      </flowreferences>
      <object1 id="123">
      ......
      </object1>
      <object1 id="563">
      ......
      </object2>
      <object2 id="887">
      ......
      </object2>
      <object3 id="674">
      ......
      </object3>
      <object4 id="295">
      ......
      </object4>
      <object5 id="907">
      ......
      </object5>
      <object6 id="371">
      ......
      </object6>


      Is there a Xpath query to return the object node given JUST the attribute value? In other words, if I know the id value (907), how do I find the object5 node?










      share|improve this question















      This question already has an answer here:



      • XPath selecting a node with some attribute value equals to some other node's attribute value [closed]

        2 answers



      If I have a (fragment of) xml like this:



      <flowreferences>
      <ref>123</ref>
      <ref>563</ref>
      <ref>902</ref>
      <ref>674</ref>
      <ref>295</ref>
      <ref>887</ref>
      <ref>371</ref>
      </flowreferences>
      <object1 id="123">
      ......
      </object1>
      <object1 id="563">
      ......
      </object2>
      <object2 id="887">
      ......
      </object2>
      <object3 id="674">
      ......
      </object3>
      <object4 id="295">
      ......
      </object4>
      <object5 id="907">
      ......
      </object5>
      <object6 id="371">
      ......
      </object6>


      Is there a Xpath query to return the object node given JUST the attribute value? In other words, if I know the id value (907), how do I find the object5 node?





      This question already has an answer here:



      • XPath selecting a node with some attribute value equals to some other node's attribute value [closed]

        2 answers







      xml xpath






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Mar 28 at 1:42









      stoneyowlstoneyowl

      114 bronze badges




      114 bronze badges





      marked as duplicate by Kirill Polishchuk xml
      Users with the  xml badge can single-handedly close xml questions as duplicates and reopen them as needed.

      StackExchange.ready(function()
      if (StackExchange.options.isMobile) return;

      $('.dupe-hammer-message-hover:not(.hover-bound)').each(function()
      var $hover = $(this).addClass('hover-bound'),
      $msg = $hover.siblings('.dupe-hammer-message');

      $hover.hover(
      function()
      $hover.showInfoMessage('',
      messageElement: $msg.clone().show(),
      transient: false,
      position: my: 'bottom left', at: 'top center', offsetTop: -7 ,
      dismissable: false,
      relativeToBody: true
      );
      ,
      function()
      StackExchange.helpers.removeMessages();

      );
      );
      );
      Mar 28 at 2:23


      This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.





      migrated from superuser.com Mar 28 at 1:44


      This question came from our site for computer enthusiasts and power users.











      marked as duplicate by Kirill Polishchuk xml
      Users with the  xml badge can single-handedly close xml questions as duplicates and reopen them as needed.

      StackExchange.ready(function()
      if (StackExchange.options.isMobile) return;

      $('.dupe-hammer-message-hover:not(.hover-bound)').each(function()
      var $hover = $(this).addClass('hover-bound'),
      $msg = $hover.siblings('.dupe-hammer-message');

      $hover.hover(
      function()
      $hover.showInfoMessage('',
      messageElement: $msg.clone().show(),
      transient: false,
      position: my: 'bottom left', at: 'top center', offsetTop: -7 ,
      dismissable: false,
      relativeToBody: true
      );
      ,
      function()
      StackExchange.helpers.removeMessages();

      );
      );
      );
      Mar 28 at 2:23


      This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.





      migrated from superuser.com Mar 28 at 1:44


      This question came from our site for computer enthusiasts and power users.









      marked as duplicate by Kirill Polishchuk xml
      Users with the  xml badge can single-handedly close xml questions as duplicates and reopen them as needed.

      StackExchange.ready(function()
      if (StackExchange.options.isMobile) return;

      $('.dupe-hammer-message-hover:not(.hover-bound)').each(function()
      var $hover = $(this).addClass('hover-bound'),
      $msg = $hover.siblings('.dupe-hammer-message');

      $hover.hover(
      function()
      $hover.showInfoMessage('',
      messageElement: $msg.clone().show(),
      transient: false,
      position: my: 'bottom left', at: 'top center', offsetTop: -7 ,
      dismissable: false,
      relativeToBody: true
      );
      ,
      function()
      StackExchange.helpers.removeMessages();

      );
      );
      );
      Mar 28 at 2:23


      This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.





      migrated from superuser.com Mar 28 at 1:44


      This question came from our site for computer enthusiasts and power users.
























          1 Answer
          1






          active

          oldest

          votes


















          1















          This XPath will select all object5 elements with id attributes values of "907":



          //object5[@id="907"]


          This XPath will select all elements with id attributes values of "907":



          //*[@id="907"]





          share|improve this answer

























          • And //*[contains(local-name(), 'object') and @id='907'] should select all elements containing object and @id='907' in case that id number is used somewhere else in the code.

            – Jack Fleeting
            Mar 28 at 12:14







          • 1





            @JackFleeting: Thanks, note, though that testing local-name() alone bypasses namespaces and using contains() means that elements such as not_this_object with such an id value will also be selected. But, yes, that's one way to ignore the numeric suffix tacked onto the object element names.

            – kjhughes
            Mar 28 at 12:24














          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          1















          This XPath will select all object5 elements with id attributes values of "907":



          //object5[@id="907"]


          This XPath will select all elements with id attributes values of "907":



          //*[@id="907"]





          share|improve this answer

























          • And //*[contains(local-name(), 'object') and @id='907'] should select all elements containing object and @id='907' in case that id number is used somewhere else in the code.

            – Jack Fleeting
            Mar 28 at 12:14







          • 1





            @JackFleeting: Thanks, note, though that testing local-name() alone bypasses namespaces and using contains() means that elements such as not_this_object with such an id value will also be selected. But, yes, that's one way to ignore the numeric suffix tacked onto the object element names.

            – kjhughes
            Mar 28 at 12:24















          1















          This XPath will select all object5 elements with id attributes values of "907":



          //object5[@id="907"]


          This XPath will select all elements with id attributes values of "907":



          //*[@id="907"]





          share|improve this answer

























          • And //*[contains(local-name(), 'object') and @id='907'] should select all elements containing object and @id='907' in case that id number is used somewhere else in the code.

            – Jack Fleeting
            Mar 28 at 12:14







          • 1





            @JackFleeting: Thanks, note, though that testing local-name() alone bypasses namespaces and using contains() means that elements such as not_this_object with such an id value will also be selected. But, yes, that's one way to ignore the numeric suffix tacked onto the object element names.

            – kjhughes
            Mar 28 at 12:24













          1














          1










          1









          This XPath will select all object5 elements with id attributes values of "907":



          //object5[@id="907"]


          This XPath will select all elements with id attributes values of "907":



          //*[@id="907"]





          share|improve this answer













          This XPath will select all object5 elements with id attributes values of "907":



          //object5[@id="907"]


          This XPath will select all elements with id attributes values of "907":



          //*[@id="907"]






          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Mar 28 at 1:51









          kjhugheskjhughes

          71.3k14 gold badges103 silver badges147 bronze badges




          71.3k14 gold badges103 silver badges147 bronze badges















          • And //*[contains(local-name(), 'object') and @id='907'] should select all elements containing object and @id='907' in case that id number is used somewhere else in the code.

            – Jack Fleeting
            Mar 28 at 12:14







          • 1





            @JackFleeting: Thanks, note, though that testing local-name() alone bypasses namespaces and using contains() means that elements such as not_this_object with such an id value will also be selected. But, yes, that's one way to ignore the numeric suffix tacked onto the object element names.

            – kjhughes
            Mar 28 at 12:24

















          • And //*[contains(local-name(), 'object') and @id='907'] should select all elements containing object and @id='907' in case that id number is used somewhere else in the code.

            – Jack Fleeting
            Mar 28 at 12:14







          • 1





            @JackFleeting: Thanks, note, though that testing local-name() alone bypasses namespaces and using contains() means that elements such as not_this_object with such an id value will also be selected. But, yes, that's one way to ignore the numeric suffix tacked onto the object element names.

            – kjhughes
            Mar 28 at 12:24
















          And //*[contains(local-name(), 'object') and @id='907'] should select all elements containing object and @id='907' in case that id number is used somewhere else in the code.

          – Jack Fleeting
          Mar 28 at 12:14






          And //*[contains(local-name(), 'object') and @id='907'] should select all elements containing object and @id='907' in case that id number is used somewhere else in the code.

          – Jack Fleeting
          Mar 28 at 12:14





          1




          1





          @JackFleeting: Thanks, note, though that testing local-name() alone bypasses namespaces and using contains() means that elements such as not_this_object with such an id value will also be selected. But, yes, that's one way to ignore the numeric suffix tacked onto the object element names.

          – kjhughes
          Mar 28 at 12:24





          @JackFleeting: Thanks, note, though that testing local-name() alone bypasses namespaces and using contains() means that elements such as not_this_object with such an id value will also be selected. But, yes, that's one way to ignore the numeric suffix tacked onto the object element names.

          – kjhughes
          Mar 28 at 12:24








          Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.







          Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.





          Popular posts from this blog

          SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

          용인 삼성생명 블루밍스 목차 통계 역대 감독 선수단 응원단 경기장 같이 보기 외부 링크 둘러보기 메뉴samsungblueminx.comeh선수 명단용인 삼성생명 블루밍스용인 삼성생명 블루밍스ehsamsungblueminx.comeheheheh

          155 수학 과학 기타 둘러보기 메뉴eh추가해eh문서를 완성해