phpQuery::newDocumentXML PHP Method

newDocumentXML() public static method

Chainable.
public static newDocumentXML ( unknown_type $markup = null, $charset = null ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery
$markup unknown_type
return phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery
    public static function newDocumentXML($markup = null, $charset = null)
    {
        $contentType = $charset ? ";charset={$charset}" : '';
        return self::newDocument($markup, "text/xml{$contentType}");
    }

Usage Example

Example #1
0
 public function testExtend()
 {
     $newMethods = array('newMethod1' => array($this, 'callback1'), 'newMethod2' => array($this, 'callback2'));
     phpQuery::extend('phpQueryObject', $newMethods);
     $doc = phpQuery::newDocumentXML("<div/>");
     $this->assertTrue($doc->newMethod1() == $doc, '$doc->newMethod1 == $doc');
     $this->assertTrue($doc->newMethod2() == "callback2", '$doc->newMethod1 == "callback2"');
 }
All Usage Examples Of phpQuery::newDocumentXML