Questions tagged [normalize-space]

For questions specific to the XPath "normalize-space" function that removes whitespace characters in a string. When using this tag also include the [xpath] and/or [xslt] tag(s) as appropriate for context.

11 questions
1
vote
1 answer

Selenium Python: How to capture li element with specific text

I am trying to extract urlToBeCaptured and Text to be captured from the HTML. The structure looks as follows:
  • " text with trailing spaces "
    bekon
    • 305
    • 1
    • 4
    • 12
  • 1
    vote
    2 answers

    xslt: apply normalize-space to a subtree

    My XML input looks like: James Smith United Kingdom good social skills, MSc, 10 years of experience …
    Pierre François
    • 5,850
    • 1
    • 17
    • 38
    1
    vote
    1 answer

    How to automate snackbar message which stays only for seconds using Python Selenium

    I have to automate highlighted "P" tag text. Snapshot of the element: I am trying with below code. But its not identifying the element. ele = WebDriverWait(driver,10).until(EC.presence_of_element_located((By.XPATH,'//p[text()="Connection Tested…
    S_G
    • 67
    • 6
    1
    vote
    0 answers

    How do I add normalize-space into my psql query statement to remove \302\240 from my query results

    This is my blob statement (xpath('/d:Invoice/d:InvoiceDetail/d:InvoiceLineItem/d:LineItemDescription/text()', xml, '{{d,http://www.m00.com/2019/01/RRRInvoice}}'))[1]::text as…
    1
    vote
    1 answer

    Query Xpath match first string instead of contain text()

    I have a xml file like this: A0B100 A0B101 B1A100 B1A101 I use xpath query to select value of node that contain "B1" my code : $txtSearch = "B1"; $titles =…
    Hàm Louis
    • 41
    • 7
    0
    votes
    1 answer

    Xpath for text between tag with space in between after every tag change

    text is like Head Office41-43 Ricketts Road Mount Waverley, Melbourne iam getting result as Head Office41-43 Ricketts RoadMount Waverley, Melbourne but i want it as Head Office41-43 Ricketts Road Mount Waverley,…
    0
    votes
    1 answer

    XPATH - Multiple Url's

    The code bellow, can count the number of times that the following words appearing on the URL consultor imobiliario , Consultora Imobil and Consultor Imobil repeats:
    Zuclaspt
    • 3
    • 3
    0
    votes
    2 answers

    XPATH - normalize-space with more than 1 text for counting purposes

    Hi everyone i'm noob at this, https://decisoesesolucoes.com/agencias/albergaria/consultores In the url above, i want to count the number of 'consultor imobiliario' and 'Consultora Imobiliaria' , both the text has spaces, so why im using the…
    Zuclaspt
    • 3
    • 3
    0
    votes
    1 answer

    xPath normalize space Example

    The following line is a scrapy selector. How would I apply normalize-space() to this? rows.xpath("//table[@id='PlaceHolderMain']/tbody/tr/td[1]/span/text()").get()
    0
    votes
    1 answer

    Can't find element using normalize-space(text())

    I'm having problems finding the following element with this xpath //label[normalize-space(text())='F. nacimiento:'] HTML DOM The green element is the one I want to locate using the previous expression. I was able to find the red element with…
    0
    votes
    1 answer

    is shown by XSLT

    I want print attribute and put some values to it. Input :
    text
    my output: Tried code :
    user5000
    • 39
    • 6