Actionscript

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: ty='verified'>Gary</name> <ID>47</user>"); for(attr in myXML.childNodes[0].childNodes[0].attributes) { trace(attr+": "+myXML.childNodes[0].childNodes[0].attributes[attr]); } output window s cho ra: alias và verified Thêm vài AS v XML B n cũng c n bi t thêm m t s i u v i tư ng XML. Nh t là i m sau, b t c m t ph n nào c a i tư ng XML cũng có th là m t i tư ng XML riêng bi t. Ví d b n có th l y cái node u tiên c a i tư ng XML và quy thành m t bi n CODE myXML = new XML("<user><name>Gary</name><ID>47</user>"); thisUser = myXML.childNodes[0]; thisUserName = thisUser.childNodes[0]; thisUserNameText = thisUserName.childNodes[0].nodeValue; thisUserID = thisUser.childNodes[1]; thisUserIDText = thisUserID.childNodes[0].nodeValue; B n có th bi t ư c s node trong trong m t node khác b ng thu c tính length c a childNodes. Ví d , user node có 2 node trong, v y b n có th bi t ư c b ng v i o n code sau: CODE myXML = new XML("<u...
View Full Document

This note was uploaded on 01/16/2013 for the course BANKING 111 taught by Professor Johnsmith during the Spring '13 term at University of Economics and Technology.

Ask a homework question - tutors are online