The Altair Community is migrating to a new platform to provide a better experience for you. In preparation for the migration, the Altair Community is on read-only mode from October 28 - November 6, 2024. Technical support via cases will continue to work as is. For any urgent requests from Students/Faculty members, please submit the form linked here

[SOLVED] Xpath syntax help for extract information process

pjdoubleyoupjdoubleyou Member Posts: 6 Contributor II
Hello everyone,
Very new to Rapid Miner, but really excited about what it can do. I've got a question about Xpath syntax, I'm trying to grab the H1 of class 'mainbox-titile' (it's the product name, "ADORA SANDAL - 238523") from http://www.eccocanada.com/adora-sandal-238523.html. I've tried various different versions of //h:*[@class='mainbox-title']/h:h1/text(), but I can't seem to get it right. Any tips would be greatly appreciated...

Thanks,

Answers

  • SkirzynskiSkirzynski Member Posts: 164 Maven
    Hey,

    You want to grab the the h1 tag with the class 'mainbox-title', but your XPath says that you want any tag with the class 'mainbox-title' which contains a h1 tag. So your path finds the h1 tag, looks inside, does not find another h1 tag within the h1 tag, and thus, returns nothing.

    So, the correct path for the title is:

    //h:h1[@class='mainbox-title']/text()
  • pjdoubleyoupjdoubleyou Member Posts: 6 Contributor II
    Works like a charm! Thanks for the help and apologies for the slow reply...
Sign In or Register to comment.