I wa" />
          I wa" />
              I wa"/>

              TechQA.

              xpath to select full content of the class except one sub child class

              725 views Asked by Arunkumar At 2016-08-31T13:47:10+00:00 31 August 2016 at 13:47 2025-12-23T08:59:47+00:00
              <div class="content" style="opacity: 1;">
                    <div class="A" >
                    <ul class ="any" >
                    <div class ="demo" >
                    <div class="pipe" >
                    <ul class= "markedl-list">
              

              I want to select class content except sub class "marked-list" Any help?

              xpath import.io
              Original Q&A
              1

              There are 1 answers

              0
              Daniel Haley Daniel Haley On 2016-08-31T15:49:35+00:00 31 August 2016 at 15:49

              Assuming the elements you're trying to select are direct children of div with the class content and you don't need to select the parent "content" div, this xpath 1.0 should work...

              //div[contains(concat(' ',normalize-space(@class),' '),' content ')]/*[not(contains(concat(' ',normalize-space(@class),' '),' markedl-list '))]
              

              Note the possible misspelling of "markedl-list".

              Also, the use of contains(concat(' ',normalize-space(@class),' '),' someclass ') might seem like overkill, but will account for the possibility of classes other than the target class being in the class attribute. If you can use XPath 2.0, this test is much cleaner (How can I match on an attribute that contains a certain string?).

              Example: http://www.xpathtester.com/xpath/d449841c402b3e15ef69e3004a39ee6c

              Related Questions in XPATH

              • How can I load all the elements of a webpage with Selenium?
              • Why is the copied XPATH not working for selenium?
              • When I'm typing an Xpath or CSS selector in the console why won't matching results appear while typing? Results only appear after pressing Enter
              • Nokogiri only returning 5 results
              • XPath - how to exclude text from child node
              • xpath issue in nested div
              • Question using XPath to look for a sibling of a td with a certain name
              • How to separate XML tags in freemarker in body function
              • Wait using Path (Puppeteer)
              • why can't I retrieve the track of my Spotify playlist even i have given correct full xpath
              • How do I click the correct link based on text contained in another element using Selenium + Python?
              • PHP DOMDocument ignores first table's closing tag
              • String tokenise an xpath expression
              • Problem to get into the next page, Selenium
              • Scrapy / extracting data across multiple HTML tags

              Related Questions in IMPORT.IO

              • How do I parse this JSON data in C# and would it be more benefical to simply switch over to javascript?
              • Scraping infinte scroll - GET url not working
              • Import.io extract data from Post Request
              • Troubleshooting import.io
              • JSON Query for import.io
              • How to concat two values in one column using import.io
              • JSON Line issue when loading from import.io using Python
              • Url regex from data extracted from <script>
              • Parse JSON in string format via PHP
              • Does Import.io api support status of the extractor?
              • How would I go about parsing this? (Node.js)
              • import.io and portia regex url patterns
              • Replace double slash with single slash in import.io XPath selector
              • xpath to select full content of the class except one sub child class
              • XPath - Extract spectific file name from string

              Popular Questions

              • How do I undo the most recent local commits in Git?
              • How can I remove a specific item from an array in JavaScript?
              • How do I delete a Git branch locally and remotely?
              • Find all files containing a specific text (string) on Linux?
              • How do I revert a Git repository to a previous commit?
              • How do I create an HTML button that acts like a link?
              • How do I check out a remote Git branch?
              • How do I force "git pull" to overwrite local files?
              • How do I list all files of a directory?
              • How to check whether a string contains a substring in JavaScript?
              • How do I redirect to another webpage?
              • How can I iterate over rows in a Pandas DataFrame?
              • How do I convert a String to an int in Java?
              • Does Python have a string 'contains' substring method?
              • How do I check if a string contains a specific word?

              Trending Questions

              • UIImageView Frame Doesn't Reflect Constraints
              • Is it possible to use adb commands to click on a view by finding its ID?
              • How to create a new web character symbol recognizable by html/javascript?
              • Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
              • Heap Gives Page Fault
              • Connect ffmpeg to Visual Studio 2008
              • Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
              • How to avoid default initialization of objects in std::vector?
              • second argument of the command line arguments in a format other than char** argv or char* argv[]
              • How to improve efficiency of algorithm which generates next lexicographic permutation?
              • Navigating to the another actvity app getting crash in android
              • How to read the particular message format in android and store in sqlite database?
              • Resetting inventory status after order is cancelled
              • Efficiently compute powers of X in SSE/AVX
              • Insert into an external database using ajax and php : POST 500 (Internal Server Error)
              • Privacy
              • Terms
              • Cookies
              • Homegardensmart
              • Aftereffectstemplates
              • Jogjafile