nokogiri - Xpath: how do you select the second text node (specific text node) -


एक html पृष्ठ पर विचार करें

  & lt; html & gt; सेब नारंगी दवाओं & lt; / html & gt;  

आप कैसे xpath का उपयोग करके नारंगी का चयन कर सकते हैं?

  / html / text () [2]  

doesn काम नहीं करते हैं।

आप चयन करके सीधे इसे नहीं कर सकते

  substring-after (/ html / text (), "") // कुछ इस तरह की स्ट्रिंग प्राप्त करने के लिए आपको टेक्स्ट () को कट करने के लिए xpath स्ट्रिंग फ़ंक्शन को कॉल करना होगा,  

यहां एक

है

Comments

Popular posts from this blog

ios - Form Sheet content disappearing -

MySql variables and php -

c++ - an enclosing-function local variable cannot be referenced in a lambda body unless if it is in capture list -