# e2pdf/1.01.01/classes/helper/e2pdf-xml.php

E2Pdf – Export Pdf Tool for WordPress, version 1.01.01. 55 lines.

- Page: https://pluginprobe.com/plugins/e2pdf/1.01.01/code/classes/helper/e2pdf-xml.php
- Raw: https://pluginprobe.com/plugins/e2pdf/1.01.01/raw/classes/helper/e2pdf-xml.php
- Modified: 2018-11-07T14:59:18+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/e2pdf/1.01.01/code/classes/helper/e2pdf-xml.php#L10-L20`.

```php
<?php

/**
 * E2pdf Zip Helper
 * 
 * @copyright  Copyright 2017 https://e2pdf.com
 * @license    GPL v2
 * @version    1
 * @link       https://e2pdf.com
 * @since      0.00.01
 */
if (!defined('ABSPATH')) {
    die('Access denied.');
}

class Helper_E2pdf_Xml {

    private $xml = null;

    /**
     * Check if extension simplexml available
     * 
     * @return bool
     */
    public function check() {
        if (extension_loaded('simplexml')) {
            return true;
        } else {
            return false;
        }
    }

    /**
     * Create new XML
     * 
     * @param string $key - Wrapper of XML
     * 
     * @return object - XML Object
     */
    public function create($key = false) {
        $this->xml = new Helper_E2pdf_SimpleXMLElement('<?xml version="1.0" encoding="UTF-8"?><' . $key . '></' . $key . '>');
        return $this->xml;
    }

    /**
     * Get XML file in Base64
     * 
     * @return string
     */
    public function get_xml() {
        return base64_encode($this->xml->asXML());
    }

}

```
