Skip to content

Tag: parsing

simplexml_load_file does not recognize tags

I am trying to use simplexml_load_file() to load an XML file and reach <dc:title> tags, but when I dump the $xml variable that loaded my xml file all the tags that starts with <dc: doesn’t show. Is there a way of telling the parser to include them? should I use a different parser? Here’s …

PHP Cleaning special characters from string

so I made this scraper and it returns strings from multiple sites. I want to check if the strings match, so I use php to clean the string and check. However, the & and other special characters appear in 2 ways, one as &amp; and the other as &. How do I go about removing each type. I already have

Parsing Wikipedia Page tables issue

Hi I’m trying to parse a Wikipedia document in which there is a table called “infobox biota” with this structure. I’m trying to get the following table data and classes of the following …