XPath for MTASC and AS 2
I'm working on a project that relies heavily on XML, and, while I was aware that there were some AS2 XPath implementations out there, I hadn't done any research on them. Today I finally got around to some googling...
For those who don't know, XPath is a language that allows you to easily search an XML document. You pass in a node and a search string to your XPath API, and it returns a child node or an array of children. For example, XPath.selectNode(xmlDocument, "adam") would return the first node found in xmlDocument.
There appear to be two viable alternatives for using XPath with MTASC (I successfully tried both).
1. Adobe has a built-in XPathAPI object hidden away in it's "mx" classes. A nice tutorial with links is available here.
Pro
Con
2. XFactorStudio.com has an extensive XPath library that is easily imported into any project.
Pro
Con
For those who don't know, XPath is a language that allows you to easily search an XML document. You pass in a node and a search string to your XPath API, and it returns a child node or an array of children. For example, XPath.selectNode(xmlDocument, "adam") would return the first
There appear to be two viable alternatives for using XPath with MTASC (I successfully tried both).
1. Adobe has a built-in XPathAPI object hidden away in it's "mx" classes. A nice tutorial with links is available here.
Pro
Small footprint - Well-documented
Requieres the "DataBindingClass" compiled clip in your library. A limited implementation of the XPath language.
2. XFactorStudio.com has an extensive XPath library that is easily imported into any project.
Pro
Extensive implementation. Code is open source
Con
No documentatation (I did find a helpful and amusing example here). Added about 75kb to my SWF