>- see footer for list info -<
Ah, wasn't paying full attention before... you've got an odd mix there.

Try this:
<cfscript>
  myXML = xmlNew(true);
  myXML.xmlRoot = xmlElemNew(myXML, "breakfast_menu");
  myXML.xmlRoot["food"] = xmlElemNew(myXML, "food");
  myXML.xmlRoot["morefood"] = xmlElemNew(myXML, "morefood");
  myXML.xmlRoot["food"]["name"] = xmlElemNew(myXML, "name");
</cfscript>
<cfdump var="#myXML#"/>

That'll produce equivalent xml object to:
<breakfast_menu>
    <food>
        <name/>
    </food>
    <morefood/>
</breakfast_menu>


Then I'm guessing you'll want to also start adding stuff like:
  myXML.xmlRoot["food"]["name"].XmlText = "Belgian Waffles";
  myXML.xmlRoot["food"]["name"].XmlAttributes["quantity"] = 50;

Which (when added to the above) will provide you with:
<breakfast_menu>
    <food>
        <name quantity="50">Belgian Waffles</name>
    </food>
    <morefood/>
</breakfast_menu>


Hope that helps? :)
_______________________________________________

For details on ALL mailing lists and for joining or leaving lists, go to 
http://list.cfdeveloper.co.uk/mailman/listinfo

--
CFDeveloper Sponsors:-
>- cfdeveloper Hosting provided by www.cfmxhosting.co.uk -<
>- Lists hosted by www.Gradwell.com -<
>- CFdeveloper is run by Russ Michaels, feel free to volunteer your help -<

Reply via email to