Title: Loading XML-file from a php file include
Last modified: August 20, 2016

---

# Loading XML-file from a php file include

 *  [Maarten.Provo](https://wordpress.org/support/users/maartenprovo/)
 * (@maartenprovo)
 * [13 years, 10 months ago](https://wordpress.org/support/topic/loading-xml-file-from-a-php-file-include/)
 * I’ve installed the plugin ‘Allow PHP in Posts and Pages’ to run [this script](http://www.maartenprovo.be/projects/form/Pricecalc3-nl.php)
   inside a wordpress-page, this trick works in my Joomla-site but I can’t seem 
   to get it working.
 * The page I’m trying to create is at [my test-website](http://test.maartenprovo.be/?page_id=57).
 * I’ve copied some of the code below, but I think it stops executing after the 
   xhttp.open(“GET” …
 *     ```
       // create XML request
       	if (window.XMLHttpRequest) {
       		xhttp = new XMLHttpRequest();
       	} else {
       		// support for IE 5/6
       		xhttp = new ActiveXObject("Microsoft.XMLHTTP");
       	} 
   
       	// load XML file
       	xhttp.open("GET", "http://www.maartenprovo.be/projects/form/pricing.xml", false);
       	xhttp.send(null);
       	xmlDoc = xhttp.responseXML;
       ```
   
 * What’s wrong and how can I solve it?

Viewing 1 replies (of 1 total)

 *  [s_ha_dum](https://wordpress.org/support/users/apljdi/)
 * (@apljdi)
 * [13 years, 10 months ago](https://wordpress.org/support/topic/loading-xml-file-from-a-php-file-include/#post-2911736)
 * Why don’t you skip the plugin and create a [theme template](http://codex.wordpress.org/Theme_Development#Custom_Page_Templates)
   for this page? You remove a layer of complexity that way. As it is, you are debugging
   two different things at once.

Viewing 1 replies (of 1 total)

The topic ‘Loading XML-file from a php file include’ is closed to new replies.

## Tags

 * [php](https://wordpress.org/support/topic-tag/php/)
 * [xml](https://wordpress.org/support/topic-tag/xml/)

 * 1 reply
 * 2 participants
 * Last reply from: [s_ha_dum](https://wordpress.org/support/users/apljdi/)
 * Last activity: [13 years, 10 months ago](https://wordpress.org/support/topic/loading-xml-file-from-a-php-file-include/#post-2911736)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
