Title: xpath not finding headings
Last modified: August 30, 2016

---

# xpath not finding headings

 *  [1000camels](https://wordpress.org/support/users/1000camels/)
 * (@1000camels)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/xpath-not-finding-headings/)
 * I’m not sure what is happening in my environment. This plugin used to work great
   on this same code. There was an error with saveHTML, which said something about
   wanting 0 arguments, not 1. I discovered this was related to the version of php
   I have. I’ve upgraded to PHP 5.5.25, and the error is gone. However, it is still
   not working.
 * As best I can see, the first xpath is not finding anything:
 * $tags = $xpath->query(‘/html/body/*[self::h1 or self::h2 or self::h3 or self::
   h4 or self::h5 or self::h6]’);
 * Any ideas what would be calling that?
 * Here’s an example of the page I am parsing: [http://jmsc.hku.hk/businesscasestudies/2011/04/27/case-study-1/](http://jmsc.hku.hk/businesscasestudies/2011/04/27/case-study-1/)
 * [https://wordpress.org/plugins/tinytoc/](https://wordpress.org/plugins/tinytoc/)

The topic ‘xpath not finding headings’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/tinytoc_b18f13.svg)
 * [tinyTOC](https://wordpress.org/plugins/tinytoc/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/tinytoc/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/tinytoc/)
 * [Active Topics](https://wordpress.org/support/plugin/tinytoc/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/tinytoc/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/tinytoc/reviews/)

## Tags

 * [xpath](https://wordpress.org/support/topic-tag/xpath/)

 * 0 replies
 * 1 participant
 * Last reply from: [1000camels](https://wordpress.org/support/users/1000camels/)
 * Last activity: [10 years, 11 months ago](https://wordpress.org/support/topic/xpath-not-finding-headings/)
 * Status: not resolved