XML append node without DOM

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • DrewM

    XML append node without DOM

    Note: I'm not using the xmldom functions because I need to maintain
    compatibility with current typical installs.

    Say I have an XML file like this on my disk:

    <list>
    <item>foo</item>
    <item>bar</item>
    </list>

    What's the best way to add another <item /> to this file without using a
    dom?

    I'm open to any suggestions that'll work well on a typical 4.1.2 install.

    thank you! :)


    drew

  • Ian P. Christian

    #2
    Re: XML append node without DOM

    DrewM wrote:
    [color=blue]
    > I'm open to any suggestions that'll work well on a typical 4.1.2 install.[/color]

    If you have a look in the group archive, someone suggested a library to me
    about 3 days ago, which is an XML library completly in PHP. Also, look at
    pear.php.net for thier XML stuff,

    Ian P. Christian

    Comment

    • Zurab Davitiani

      #3
      Re: XML append node without DOM

      DrewM wrote on Thursday 16 October 2003 12:49:
      [color=blue]
      > Note: I'm not using the xmldom functions because I need to maintain
      > compatibility with current typical installs.
      >
      > Say I have an XML file like this on my disk:
      >
      > <list>
      > <item>foo</item>
      > <item>bar</item>
      > </list>
      >
      > What's the best way to add another <item /> to this file without using a
      > dom?[/color]

      ActiveLink PHP XML Package. :)


      Download ActiveLink PHP XML Package for free. ActiveLink PHP XML Package provides means to parse, read, modify and output XML and XML documents without using any PHP XML libraries. Included classes are: XML, XMLDocument, XMLBranch, XMLLeaf, RSS, Tag, Tree, Branch, Leaf, File, Socket, HTTPClient.

      OR your favorite source.

      The latest version is 0.3.2
      Note, that you don't need _any_ of PHP's XML packages to use ActiveLink PHP
      XML Package since it's purely implemented in PHP (as Ian pointed out too).
      It's available under LGPL, comes with full class documentation, and a
      useful example/tutorial script to get you started.

      Good luck!

      --
      Business Web Solutions
      ActiveLink, LLC

      Comment

      Working...