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

XML parse error with html file in Wordpress

New
1#
New Published in 2018-01-13 05:38:03Z

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.

<?php

$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"?>
  <chapter_list>
  <list>
  <link>100万の命の上に俺は立っている-20-100-man-no-inochi-no-ue-ni-ore-wa-tatte-iru-20-raw/</link>
   <chapt>100万の命の上に俺は立っている 20</chapt>
  </list>

  <list>
  <link>100万の命の上に俺は立っている-19-100-man-no-inochi-no-ue-ni-ore-wa-tatte-iru-19-raw/</link>
    <chapt>100万の命の上に俺は立っている 19</chapt>
  </list>
   .....
   </chapter_list>

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.322152 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO