Q: How to use XPath in Octoparse?
Solutions are available for a related question here. Go to have a check now!
A:
It depends on what kinds of data you want to extract.
1. Fixed Value
If you want to change the XPath of the item to precisely locate the value you want. You could just click the fixed value field you want to customize under the “Extract Data” tag. And choose “Customize Field” and “Define ways to locate an item”. Then you could enter the XPath in the “Matching XPath” text box.
2. Loop Item
If you want to manually change the XPath of the loop item, you could click the loop item box and then enter the Xpath in the text box under "Loop mode" in the "Advanced Options".
3. Missing Data or Extra Data
In the loop process, not all details are provided by all the items. If you want to precisely locate the information you want, you could change the relative XPath of the item.
Also, you need to click the value you want to customize under the “Extract Data” in the “Loop Item” tag. And then choose “Customize Field” and “Define ways to locate an item”.
Then you could enter the XPath in the “Relative XPath” text box.
Click Modify XPath Manually in Octoparse to know more about how to manually change XPath in particular occasions.