Women in Technology

Hear us Roar

  Exploring E4X with Ruby
Subject:   Nice Idea
Date:   2004-09-12 08:03:26
From:   joebagOdonuts
Can't seem to get it to work though. Get this error when trying to add the new account.

c:/ruby/lib/ruby/site_ruby/1.8/REXML/document.rb:73:in `<<': attempted adding second root element to document (RuntimeError)

Main Topics Oldest First

Showing messages 1 through 1 of 1.

  • Jack Herrington photo Nice Idea
    2004-09-12 09:13:40  Jack Herrington | O'Reilly Author [View]

    Sounds like you need to add the new tree to the root element as opposed to the document. For example:

    myDoc.myRoot << myNewTree;

    As opposed to:

    myDoc << myNewTree

    If that doesn't work you can send me (jack_d_herrington@pobox.com) the code and I will take a look at it.