When I am parsing an XML file, there are some <none> tags that the system automatically generates for various fields...  BUT, There are no </none> tags . 
So, my XML parser gives errors and is not parsing the ENTIRE file. 
How do I get rid of this error?
$xml = simplexml_load_file($newfile3);  
<none&开发者_运维知识库gt; is not a tag ... So, I just want to ignore this  or replace with something else like "none" ...
$newfile3 = str_replace('<none>', '<none>', $newfile3);
basically replace the bad 'tag' with the two metacharacters encoded into entities.
Zac, you should load the file first, then use the code from Marc B
$string = str_replace('<none>', 'your_replacement', file_get_contents($newfile3));
$xml = simplexml_load_string($string);
This should do the trick
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论