Jump to content

Fatal error: Call to a member function asXML() on a non-objec


CDYK

Recommended Posts

can anybody help me out.I am gettin an error stated as:
error:Fatal error: Call to a member function asXML() on a non-objec

<?php
    $projectXML = simplexml_load_string($_POST["projectXML"]);
    $sxe = new SimpleXMLElement($projectXML->asXML(),null,true);
    $sxe->registerXPathNamespace('n', 'https://kanbanflow.com/board/a01f59dbfc653e60e6af4a1ad43e30d0');
    //$result = $sxe->xpath('/n:Project/n:Tasks/n:Task[n:UID[text()="0"]]');
    $title = $result[0]->Name;
    header('Content-type: text/html');
    echo $sxe->asXML();
?>
<html>
    <head>
        <title>Gantter UI Extension Example</title>
    </head>
    
    <body>
        <h1>Gantter UI Extension Example</h1>
        
        Your email address is: <b><?php echo $_POST["email"]?></b> <br/>
        You were working in the <b><?php echo $_POST["currentWorkspace"] ?> workspace</b> <br/>
        The project title is: <b><?php echo $title ?></b> <br/>
        These rows were selected: <b><?php echo $_POST["selectedItems"] ?></b> <br/>
    
    </body>
</html>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.