dcsimg
A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: xml help

  1. #1
    Junior Member
    Join Date
    Nov 2000
    Posts
    15

    xml help

    Hi! i need to create a XML structure to send with XML socket or to save it in another way.
    I built the xml structure like this:

    var myLogin = cursoXML.createElement("login");
    myLogin.attributes.username = usernameTextField;
    myLogin.attributes.passwor = passwordTextField;
    cursoXML.appendChild(myLogin);

    var directo = cursoXML.createElement("directTV");
    directo.attributes.username = "ssa";
    directo.attributes.passwor = "****";
    cursoXML.appendChild(directo);

    so... now, how can i add a subNode to the "directo" node for Example.

    thanx in advance
    Last edited by tupps; 03-24-2003 at 06:44 PM.

  2. #2
    Senior Member tupps's Avatar
    Join Date
    Jan 2001
    Location
    Melbourne
    Posts
    2,035
    First with my moderator hat on, this is a G rated board so I changed the username and password :-)

    As for the subnodes, the nodes behave pretty much the same as an XML document.

    So the code would be the same as creating the directo node, however you would then do directo.appendChild(newNode)

    Thanks

    Luke
    Flash-XML FAQ
    http://www.tupps.com/flash/faq/

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center