Is there a validating XML parser for flex/actionscript? The XML class verifies that it is well formed XML, but not that it follows the rules of the DTD. Java has a validating XML parser, but is there one for flex/actionscript?
I haven't heard of a DTD validator yet for as3, but I would like to. Meanwhile, can you not pass your xml to a server side script ( php or something ), validate it there and get the result ?
Interesting question though, I hope someone has a magic as3 dtd validation library lying around :).
There's no built in support for this, you'd have to roll your own or use an existing library.
Ok, good news, bad news time.
First the bad news: Unfortunately, no. Actionscript does not support any form of DTD validation. It also does not support any form of XSL/XSLT validation or transformation. There are projects out there which will eventually make some of this possible (XPath-AS3 for one), but for now you are stuck out of luck.
But, there is good news (sort of): First, most servers support both. This means that you could accomplish the same thing in Flash using a round-trip to the server. It is, perhaps, less than ideal, especially when dealing with large amounts of information, but it will guarantee consistent results.
Second, JavaScript supports both XSL and DTD functionality This means, if absolutely necessary, you have the ability to us ExternalInterface to force the transformations for you (and you could even adapt the JavaScript/HTML abilities on Adobe Air to do the same). This, of course, means that you will need to do even more cross-browser testing.
Sorry there is no better news.