replace XML entities:
This string contains < & >.

replace XML entities:
This string contains < & >.

building XML declaration:
<?xml version="1.0"?>

building XML declaration with additional attributes:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>

building DocType declaration:
<!DOCTYPE package SYSTEM "http://pear.php.net/dtd/package-1.0">

building DocType declaration with public ID (does not exist):
<!DOCTYPE package PUBLIC "-//PHP//PEAR/DTD PACKAGE 0.1" "http://pear.php.net/dtd/package-1.0">

building DocType declaration with internal DTD:
<!DOCTYPE package SYSTEM "http://pear.php.net/dtd/package-1.0" [
<!ELEMENT additionalInfo (#PCDATA)>
]>


converting array to string:
argh="tomato" foo="bar"

converting array to string (including line breaks):
 argh="tomato"
    foo="bar"


splitting qualified tag name:
Array
(
    [namespace] => xslt
    [localPart] => stylesheet
)

splitting qualified tag name (no namespace):
Array
(
    [namespace] => 
    [localPart] => foo
)

splitting qualified tag name (no namespace, but default namespace specified):
Array
(
    [namespace] => bar
    [localPart] => foo
)

verifying 'My private tag':
PEAR_Error Object
(
    [error_message_prefix] => 
    [mode] => 1
    [level] => 1024
    [code] => 51
    [message] => XML names may only contain alphanumeric chars, period, hyphen, colon and underscores
    [userinfo] => 
    [backtrace] => Array
        (
            [0] => Array
                (
                    [file] => /usr/local/lib/php/PEAR.php
                    [line] => 577
                    [function] => __construct
                    [class] => PEAR_Error
                    [type] => ->
                    [args] => Array
                        (
                            [0] => XML names may only contain alphanumeric chars, period, hyphen, colon and underscores
                            [1] => 51
                            [2] => 1
                            [3] => 1024
                            [4] => 
                        )

                )

            [1] => Array
                (
                    [function] => _raiseError
                    [class] => PEAR
                    [type] => ::
                    [args] => Array
                        (
                            [0] => 
                            [1] => XML names may only contain alphanumeric chars, period, hyphen, colon and underscores
                            [2] => 51
                        )

                )

            [2] => Array
                (
                    [file] => /usr/local/lib/php/PEAR.php
                    [line] => 237
                    [function] => call_user_func_array
                    [args] => Array
                        (
                            [0] => Array
                                (
                                    [0] => PEAR
                                    [1] => _raiseError
                                )

                            [1] => Array
                                (
                                    [0] => 
                                    [1] => XML names may only contain alphanumeric chars, period, hyphen, colon and underscores
                                    [2] => 51
                                )

                        )

                )

            [3] => Array
                (
                    [file] => /usr/local/lib/php/XML/Util.php
                    [line] => 960
                    [function] => __callStatic
                    [class] => PEAR
                    [type] => ::
                    [args] => Array
                        (
                            [0] => raiseError
                            [1] => Array
                                (
                                    [0] => XML names may only contain alphanumeric chars, period, hyphen, colon and underscores
                                    [1] => 51
                                )

                        )

                )

            [4] => Array
                (
                    [file] => /usr/local/lib/php/XML/Util.php
                    [line] => 960
                    [function] => raiseError
                    [class] => PEAR
                    [type] => ::
                    [args] => Array
                        (
                            [0] => XML names may only contain alphanumeric chars, period, hyphen, colon and underscores
                            [1] => 51
                        )

                )

            [5] => Array
                (
                    [file] => /usr/local/lib/php/XML/Util.php
                    [line] => 939
                    [function] => raiseError
                    [class] => XML_Util
                    [type] => ::
                    [args] => Array
                        (
                            [0] => XML names may only contain alphanumeric chars, period, hyphen, colon and underscores
                            [1] => 51
                        )

                )

            [6] => Array
                (
                    [file] => /home/challe3/public_html/dangrv/wp-content/plugins/anthologize/vendor/pear/xml_util/examples/example.php
                    [line] => 167
                    [function] => isValidName
                    [class] => XML_Util
                    [type] => ::
                    [args] => Array
                        (
                            [0] => My Private Tag
                        )

                )

        )

    [callback] => 
)


verifying '-MyTag':
PEAR_Error Object
(
    [error_message_prefix] => 
    [mode] => 1
    [level] => 1024
    [code] => 52
    [message] => XML names may only start with letter or underscore
    [userinfo] => 
    [backtrace] => Array
        (
            [0] => Array
                (
                    [file] => /usr/local/lib/php/PEAR.php
                    [line] => 577
                    [function] => __construct
                    [class] => PEAR_Error
                    [type] => ->
                    [args] => Array
                        (
                            [0] => XML names may only start with letter or underscore
                            [1] => 52
                            [2] => 1
                            [3] => 1024
                            [4] => 
                        )

                )

            [1] => Array
                (
                    [function] => _raiseError
                    [class] => PEAR
                    [type] => ::
                    [args] => Array
                        (
                            [0] => 
                            [1] => XML names may only start with letter or underscore
                            [2] => 52
                        )

                )

            [2] => Array
                (
                    [file] => /usr/local/lib/php/PEAR.php
                    [line] => 237
                    [function] => call_user_func_array
                    [args] => Array
                        (
                            [0] => Array
                                (
                                    [0] => PEAR
                                    [1] => _raiseError
                                )

                            [1] => Array
                                (
                                    [0] => 
                                    [1] => XML names may only start with letter or underscore
                                    [2] => 52
                                )

                        )

                )

            [3] => Array
                (
                    [file] => /usr/local/lib/php/XML/Util.php
                    [line] => 960
                    [function] => __callStatic
                    [class] => PEAR
                    [type] => ::
                    [args] => Array
                        (
                            [0] => raiseError
                            [1] => Array
                                (
                                    [0] => XML names may only start with letter or underscore
                                    [1] => 52
                                )

                        )

                )

            [4] => Array
                (
                    [file] => /usr/local/lib/php/XML/Util.php
                    [line] => 960
                    [function] => raiseError
                    [class] => PEAR
                    [type] => ::
                    [args] => Array
                        (
                            [0] => XML names may only start with letter or underscore
                            [1] => 52
                        )

                )

            [5] => Array
                (
                    [file] => /usr/local/lib/php/XML/Util.php
                    [line] => 925
                    [function] => raiseError
                    [class] => XML_Util
                    [type] => ::
                    [args] => Array
                        (
                            [0] => XML names may only start with letter or underscore
                            [1] => 52
                        )

                )

            [6] => Array
                (
                    [file] => /home/challe3/public_html/dangrv/wp-content/plugins/anthologize/vendor/pear/xml_util/examples/example.php
                    [line] => 173
                    [function] => isValidName
                    [class] => XML_Util
                    [type] => ::
                    [args] => Array
                        (
                            [0] => -MyTag
                        )

                )

        )

    [callback] => 
)


creating a tag with namespace and local part:
<foo:bar argh="fruit&amp;vegetable" key="value">I&apos;m inside the tag</foo:bar>

creating a tag with qualified name and namespaceUri:
<foo:bar argh="fruit&amp;vegetable" key="value" xmlns:foo="http://foo.com">I&apos;m inside the tag</foo:bar>

creating an empty tag without namespace but namespace Uri:
<bar argh="fruit&amp;vegetable" key="value" xmlns="http://foo.com" />

creating an XML tag with more namespaces:
<foo:bar argh="fruit&amp;vegetable" key="value" xmlns:bar="http://bar.com" xmlns:pear="http://pear.php.net">I&apos;m inside the tag</foo:bar>

creating a tag with CData section:
<foo argh="fruit&amp;vegetable" key="value"><![CDATA[I'm inside the tag]]></foo>

creating a tag with HTML entities:


creating a tag with createTag:
<myNs:myTag foo="bar" xmlns:myNs="http://www.w3c.org/myNs#">This is inside the tag</myNs:myTag>

trying to create an XML tag with an array as content:
PEAR_Error Object
(
    [error_message_prefix] => 
    [mode] => 1
    [level] => 1024
    [code] => 60
    [message] => Supplied non-scalar value as tag content
    [userinfo] => 
    [backtrace] => Array
        (
            [0] => Array
                (
                    [file] => /usr/local/lib/php/PEAR.php
                    [line] => 577
                    [function] => __construct
                    [class] => PEAR_Error
                    [type] => ->
                    [args] => Array
                        (
                            [0] => Supplied non-scalar value as tag content
                            [1] => 60
                            [2] => 1
                            [3] => 1024
                            [4] => 
                        )

                )

            [1] => Array
                (
                    [function] => _raiseError
                    [class] => PEAR
                    [type] => ::
                    [args] => Array
                        (
                            [0] => 
                            [1] => Supplied non-scalar value as tag content
                            [2] => 60
                        )

                )

            [2] => Array
                (
                    [file] => /usr/local/lib/php/PEAR.php
                    [line] => 237
                    [function] => call_user_func_array
                    [args] => Array
                        (
                            [0] => Array
                                (
                                    [0] => PEAR
                                    [1] => _raiseError
                                )

                            [1] => Array
                                (
                                    [0] => 
                                    [1] => Supplied non-scalar value as tag content
                                    [2] => 60
                                )

                        )

                )

            [3] => Array
                (
                    [file] => /usr/local/lib/php/XML/Util.php
                    [line] => 960
                    [function] => __callStatic
                    [class] => PEAR
                    [type] => ::
                    [args] => Array
                        (
                            [0] => raiseError
                            [1] => Array
                                (
                                    [0] => Supplied non-scalar value as tag content
                                    [1] => 60
                                )

                        )

                )

            [4] => Array
                (
                    [file] => /usr/local/lib/php/XML/Util.php
                    [line] => 960
                    [function] => raiseError
                    [class] => PEAR
                    [type] => ::
                    [args] => Array
                        (
                            [0] => Supplied non-scalar value as tag content
                            [1] => 60
                        )

                )

            [5] => Array
                (
                    [file] => /usr/local/lib/php/XML/Util.php
                    [line] => 638
                    [function] => raiseError
                    [class] => XML_Util
                    [type] => ::
                    [args] => Array
                        (
                            [0] => Supplied non-scalar value as tag content
                            [1] => 60
                        )

                )

            [6] => Array
                (
                    [file] => /home/challe3/public_html/dangrv/wp-content/plugins/anthologize/vendor/pear/xml_util/examples/example.php
                    [line] => 284
                    [function] => createTagFromArray
                    [class] => XML_Util
                    [type] => ::
                    [args] => Array
                        (
                            [0] => Array
                                (
                                    [qname] => bar
                                    [content] => Array
                                        (
                                            [foo] => bar
                                        )

                                )

                        )

                )

        )

    [callback] => 
)


trying to create an XML tag without a name:
PEAR_Error Object
(
    [error_message_prefix] => 
    [mode] => 1
    [level] => 1024
    [code] => 61
    [message] => You must either supply a qualified name (qname) or local tag name (localPart).
    [userinfo] => 
    [backtrace] => Array
        (
            [0] => Array
                (
                    [file] => /usr/local/lib/php/PEAR.php
                    [line] => 577
                    [function] => __construct
                    [class] => PEAR_Error
                    [type] => ->
                    [args] => Array
                        (
                            [0] => You must either supply a qualified name (qname) or local tag name (localPart).
                            [1] => 61
                            [2] => 1
                            [3] => 1024
                            [4] => 
                        )

                )

            [1] => Array
                (
                    [function] => _raiseError
                    [class] => PEAR
                    [type] => ::
                    [args] => Array
                        (
                            [0] => 
                            [1] => You must either supply a qualified name (qname) or local tag name (localPart).
                            [2] => 61
                        )

                )

            [2] => Array
                (
                    [file] => /usr/local/lib/php/PEAR.php
                    [line] => 237
                    [function] => call_user_func_array
                    [args] => Array
                        (
                            [0] => Array
                                (
                                    [0] => PEAR
                                    [1] => _raiseError
                                )

                            [1] => Array
                                (
                                    [0] => 
                                    [1] => You must either supply a qualified name (qname) or local tag name (localPart).
                                    [2] => 61
                                )

                        )

                )

            [3] => Array
                (
                    [file] => /usr/local/lib/php/XML/Util.php
                    [line] => 960
                    [function] => __callStatic
                    [class] => PEAR
                    [type] => ::
                    [args] => Array
                        (
                            [0] => raiseError
                            [1] => Array
                                (
                                    [0] => You must either supply a qualified name (qname) or local tag name (localPart).
                                    [1] => 61
                                )

                        )

                )

            [4] => Array
                (
                    [file] => /usr/local/lib/php/XML/Util.php
                    [line] => 960
                    [function] => raiseError
                    [class] => PEAR
                    [type] => ::
                    [args] => Array
                        (
                            [0] => You must either supply a qualified name (qname) or local tag name (localPart).
                            [1] => 61
                        )

                )

            [5] => Array
                (
                    [file] => /usr/local/lib/php/XML/Util.php
                    [line] => 646
                    [function] => raiseError
                    [class] => XML_Util
                    [type] => ::
                    [args] => Array
                        (
                            [0] => You must either supply a qualified name (qname) or local tag name (localPart).
                            [1] => 61
                        )

                )

            [6] => Array
                (
                    [file] => /home/challe3/public_html/dangrv/wp-content/plugins/anthologize/vendor/pear/xml_util/examples/example.php
                    [line] => 296
                    [function] => createTagFromArray
                    [class] => XML_Util
                    [type] => ::
                    [args] => Array
                        (
                            [0] => Array
                                (
                                    [attributes] => Array
                                        (
                                            [foo] => bar
                                        )

                                )

                        )

                )

        )

    [callback] => 
)