Mailing List
Home
Forum Home
Flash Pro
Subjects
Subject: RE: Firework Effect
Web Service Results
Flash Interface with 10mb xml file
AW: [Flashcoders] Switch/Case vs If/else
AW: [Flashcoders] Switch/Case vs If/else
Flash MX 2004 Sucks
Reading and displaying RSS feeds in Flash MX
Flash and QuickTime VR
Textfield prototype question
XML to Object help
Order of events per frame
MX2004 Dataset itemClassName
memory management removeMovieClip /
Event Dispatcher between classes
Help: MX 2004 How to script a print button to print the entire sli
ScrollPane component doesn 't auto update
setInterval bug identified and fixed
setInterval bug identified and fixed
Listener Object 's best practice
 
Element with id attribute specified is parsed as XML document

Element with id attribute specified is parsed as XML document

2004-03-19       - By Justin Watkins

 Back
First, I was like, WOW, that's really cool.  You can make xml config files
for applications, and make them *extremely efficient to use.  You don't even
have to navigate the xml dom, just assign a unique id to each config
setting.  Pretty kewl.

Then I thought, hmmm I wonder how this could turn out really really bad, and
just as I thought...  Interesting indeed.  You can blow up almost every
built in property of the xml object this way.  Shame, Shame.

-justin


/** CODE BELOW **/

trace("WHAT LIFE SHOULD BE LIKE...");
var src = "<xmlroot><node name=\"test\"></xmlroot>";
var xmlDoc = new XML(src);
_global.ASSetPropFlags(xmlDoc, null, 0, 1|2|4);
for (var i in xmlDoc) trace(i + " : " + xmlDoc[i]);

trace(newline +
newline +
"WHAT LIFE COULD BE LIKE IF YOU'RE NOT PAYING ATTENTION...");
var src = "<xmlroot>" +
"<node id=\"namespaceURI\" />" +
"<node id=\"localName\" />" +
"<node id=\"prefix\" />" +
"<node id=\"previousSibling\" />" +
"<node id=\"parentNode\" />" +
"<node id=\"nodeValue\" />" +
"<node id=\"nodeType\" />" +
"<node id=\"nodeName\" />" +
"<node id=\"nextSibling\" />" +
"<node id=\"lastChild\" />" +
"<node id=\"firstChild\" />" +
"<node id=\"childNodes\" />" +
"<node id=\"attributes\" />" +
"<node id=\"getPrefixForNamespace\" />" +
"<node id=\"getNamespaceForPrefix\" />" +
"<node id=\"toString\" />" +
"<node id=\"hasChildNodes\" />" +
"<node id=\"appendChild\" />" +
"<node id=\"insertBefore\" />" +
"<node id=\"removeNode\" />" +
"<node id=\"cloneNode\" />" +
"<node id=\"xmlDecl\" />" +
"<node id=\"status\" />" +
"<node id=\"loaded\" />" +
"<node id=\"ignoreWhite\" />" +
"<node id=\"docTypeDecl\" />" +
"<node id=\"contentType\" />" +
"<node id=\"addRequestHeader\" />" +
"<node id=\"getBytesTotal\" />" +
"<node id=\"getBytesLoaded\" />" +
"<node id=\"onData\" />" +
"<node id=\"onLoad\" />" +
"<node id=\"sendAndLoad\" />" +
"<node id=\"send\" />" +
"<node id=\"load\" />" +
"<node id=\"parseXML\" />" +
"<node id=\"createTextNode\" />" +
"<node id=\"createElement\" />" +
"<node id=\"__constructor__\" />" +
"<node id=\"__proto__\" />" +
"</xmlroot>";
var xmlDoc = new XML(src);
_global.ASSetPropFlags(xmlDoc, null, 0, 1|2|4);
for (var i in xmlDoc) trace(i + " : " + xmlDoc[i]);


=-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --
Supported by Fig Leaf Software
=-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --
Be sure to check the archives and the wiki:
http://chattyfig.figleaf.com/
=-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --
http://chattyfig.figleaf.com/cgi-bin/ezmlm-cgi?1:mss:107499
=-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --
To unsubscribe send a blank e-mail to:
Normal Mode: flashcoders-unsubscribe@(protected)
Digest Mode: flashcoders-digest-unsubscrive@(protected)