• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

I’m Ignoring You Now

Dealing with XML in Flash isn’t always the easiest thing to do. There are just so many darn rules. For one, if you’re importing an XML file into an XML object and your file was created with tabs, spaces, and return characters in it (as most are), then you can run into some trouble. Flash will treat these characters (known as white space) as if they are nodes themselves, and that can cause big problems. You could just remove all the white space and make the file one long string, but that’s hard to read. Instead, just use this code.

myData = new XML();
myData.ignoreWhite = true;
myData.load("myfile.xml");


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint