07.11
As the dev team at Macromedia ( now Adobe ) has been doing some cracking work lately, resulting in the rapidly approaching E4X in the AS3, it seems rather pointless keeping my XML Parser behind closed doors.
Written about a year ago – and evolved from code written several years before that with a friend/colleague of mine, pedrodinis (site in portuguese only), this class extends the generic flash XML class, intercepts the flash-parsed XML and parses that into an object/array format.
The biggest benefit this class has provided me with is that it doesn’t fix your XML like the native parser does and instead returns a dependable success/fail and status report from the parse process. Just recently I had a UTF-8 character encoding problem with a localisation of a site I’d completed a few months ago. The XML looked fine and flash loaded it perfectly without any errors via the native XML class. I had also chucked in some verbose status descriptions instead of just the numeric ones for debugging / error messages, so I tried the same data request, but this time using my gbXML class and immediately got a load fail.
Features:
- Verbose status descriptions via getter (i.e. myXML.statusDescription )
- Support for error tags in returned XML.
- Parses XML into Object/Array structure for easy data access / iteration.
- Allows for Object/Array transformation back into a valid XML string for comparison or returning data to server.
- Maintains natively parsed XML, so firstChild, childNodes, etc are still available.

No Comment.
Add Your Comment