Xpath for changing text
Questions about XML that are not covered by the other forums should go here.
-
- Posts: 1
- Joined: Tue Oct 10, 2017 12:34 am
Xpath for changing text
Hello.
I am trying to create a Google Sheets doc that automaticly imports prices from a url on futbin.com.
Here is an example URL: https://www.futbin.com/18/player/60/Schmeichel/
On the page im trying to get the top price for PS4, im using the formular:
=importxml(https://www.futbin.com/18/player/60/Schmeichel/, "//span[@id='ps-lowest-1']/text()")
But i only get a "-" in the colum.
Hopefully someone can tell me what im doing wrong here
I am trying to create a Google Sheets doc that automaticly imports prices from a url on futbin.com.
Here is an example URL: https://www.futbin.com/18/player/60/Schmeichel/
On the page im trying to get the top price for PS4, im using the formular:
=importxml(https://www.futbin.com/18/player/60/Schmeichel/, "//span[@id='ps-lowest-1']/text()")
But i only get a "-" in the colum.
Hopefully someone can tell me what im doing wrong here

-
- Posts: 2879
- Joined: Tue May 17, 2005 4:01 pm
Re: Xpath for changing text
Hi,
The XPath is fine, the problem is the XML source. Check the result of importxml(), it seems to be replacing all values with '-'.
Later Edit: It's not importxml() that causes this, it's most likely the web server that doesn't serve you the values in the first place. It's either some kind of data protection or the values are actually retrieved by JavaScript code which isn't running if you just import the HTML.
Regards,
Adrian
The XPath is fine, the problem is the XML source. Check the result of importxml(), it seems to be replacing all values with '-'.
Later Edit: It's not importxml() that causes this, it's most likely the web server that doesn't serve you the values in the first place. It's either some kind of data protection or the values are actually retrieved by JavaScript code which isn't running if you just import the HTML.
Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
-
- Posts: 1
- Joined: Fri Mar 09, 2018 7:24 pm
- Location: USA
- Contact:
Re: Xpath for changing text
Post by BellaHamilton »
Hi,
I have some similar problem with importing my data to xml file. Can I personally change settings of the server data protection to have the possibility to import data?
Thanks.
I have some similar problem with importing my data to xml file. Can I personally change settings of the server data protection to have the possibility to import data?
Thanks.
-
- Posts: 2879
- Joined: Tue May 17, 2005 4:01 pm
Re: Xpath for changing text
Hi,
Regards,
Adrian
Probably, if you have admin access to the server's contents. But if you have access to that you probably also have access to the server's database, in which case this kind of "import" isn't really necessary, just go for the database import.Can I personally change settings of the server data protection to have the possibility to import data?
Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
Return to “General XML Questions”
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service