Menu

No expected output

Help
comper
2004-04-18
2004-06-07
  • comper

    comper - 2004-04-18

    I'm tested ActivLink:
    Input:
    <?php
    require_once("classes/include.php");
    import("org.active-link.xml.XML");
    import("org.active-link.xml.XMLDocument");

    $myXML = new XML("A1");
    $myXML->setTagContent("Red","A1/B1");
    $myXML->setTagContent("Blue","A2/B2");

    $myXMLDoc = new XMLDocument();
    $myXMLDoc->setXML($myXML);
    $myXMLDoc->save("example.xml");
    ?>

    Output:
    <?xml version="1.0" encoding="UTF-8" ?>

    <A1>
        <B1>Red</B1>
    </A1>

    Where is problem? Thank you.

     
    • comper

      comper - 2004-04-18

      Input:
      <?php

      require_once("classes/include.php");
      import_("org.active-link.xml.XML");
      import_("org.active-link.xml.XMLDocument");

      $myXML = new XML("A1");
      $myXML->setTagContent("Red","A1/B1");
      $myXML->setTagContent("Blue","A1/B2");

      $myXMLDoc = new XMLDocument();
      $myXMLDoc->setXML($myXML);
      $myXMLDoc->save("example.xml");

      ?>
      Output:

      <?xml version="1.0" encoding="UTF-8" ?>

      <A1>
          <B1>Red</B1>
      </A1>

       
    • Zurab Davitiani

      Zurab Davitiani - 2004-06-07

      I don't know why I missed this post. My bad. In case you are still wondering, I can't duplicate the behavior. My output is:

      <?xml version="1.0" encoding="UTF-8" ?>

      <A1>
          <B1>Red</B1>
          <B2>Blue</B2>
      </A1>

      Make sure you are using the latest version of the package. If problem persists, please report your OS, PHP version, ActiveLink PHP XML Package version, and anything else that you think may help.

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.