Home XML parse error with html file in Wordpress
Reply: 0

XML parse error with html file in Wordpress

user1979 Published in July 22, 2018, 8:06 pm

I am running a Wordpress site and uses the 'Includeme' plugin to include html file in my Wordpress posts.Say the name of the html file to be included is "navigation_file.html",this file looks like this.


$str= '<th class="s1">Select chapter</th>
<th class="s2"><select onchange="location=this.value;" > 
<option selected>绔犮倰閬告姙</option>' ; 

 $xml=simplexml_load_file("mysite.com/direct/100_Man/xmlfile.xml"); <!-- Line 7 -->

  foreach( $xml->children() as $books )
   $str.='<option value="../'.$books->link.'" >'.$books->chapt.'</option>';

echo $str.'</select></th>' ;

I have 'xmlfile.xml' which the above html files tries to include and it look like this:

 <?xml version="1.0" encoding="utf-8"?>
   <chapt>100万の命の上に俺は立っている 20</chapt>

    <chapt>100万の命の上に俺は立っている 19</chapt>

Now I use the "includeme" plugin shortcode to include the "navigation_file.html": [includeme file="direct/100_Man/navigation_file.html"] .Now I preview the post I get the error Warning: simplexml_load_file(): in /home1/newfile/public_html/direct/100_Man/navigation_file.html on line 7 the line 7 is marked in the "navigation_file.html",note all the directory is correct here.And also I never had this problem before only now the problem is popping up a=out of nowhere.

Any help will be grateful and thank you.

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.30174 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO