Anyone have any ideas how to resolve this? The single quote is throwing me for a loop.
$nodes = $xml->xpath("//item[contains(@catalog,'Billy's Blogs')]/title");
I've tried to escape it in various ways, all throwing errors:
$nodes = $xml->xpath("//item[contains(@catalog,'Billy\'s Blogs')]/title");
$nodes = $xml->xpath("//item[contains(@catalog,'Billy's Blogs')]/title");
Use whatever way there is in your language (I don't know PHP) to escape the quote character inside a quoted string, something like this:
$nodes = $xml->xpath("//item[contains(@catalog,\"Billy's Blogs\")]/title"); 
As salathe answered here, you cannot escape an apostrophe in XPath.
How about using quote along with ' and "? See example in here. notes = 'New Lapytop"s ;USB" MP3 player"'
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论