I want to be able to generate HTML representations of existing Android layouts. In my case it's to help document some of my applications for users who are blind, otherwise simple screenshots would probably suffice.
Since layouts in Android use XML I expect we can convert them relatively easily. I can write the code to do so for the layouts I use, however I would prefer to use something that already exists, or at least get some pointers on how to map the XML to equivalent HTML would be great. I'm considering using Dr开发者_如何学GooidDraw as a possible base for the work if I do it myself http://www.droiddraw.org/
XSLT is easy way to translate one XML into another, however there is a lot of work with defining html equivalents of android widgets.
You can find examples here
How to run XSLT procesor you can find here
XSLT and XSLT processors are common tools, so you will find lot of code and examples. This is a bit too complicated to just put here full solution ;)
精彩评论