1 <?xml version="1.0"?> 2 <!-- To convert DroidDriver dump (say dd.xml) to UiAutomatorViewer format (say ua.uix), run: 3 xsltproc -o ua.uix to-uiautomator.xsl dd.xml --> 4 <xsl:transform version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> 5 <xsl:strip-space elements="*" /> 6 <xsl:template match="/"> 7 <hierarchy rotation="0"> 8 <xsl:apply-templates /> 9 </hierarchy> 10 </xsl:template> 11 <xsl:template match="*"> 12 <node> 13 <xsl:attribute name="index"><xsl:value-of select="position()-1" /></xsl:attribute> 14 <xsl:attribute name="text"><xsl:value-of select="@text" /></xsl:attribute> 15 <xsl:attribute name="resource-id"><xsl:value-of select="@resource-id" /></xsl:attribute> 16 <xsl:attribute name="class"><xsl:value-of select="@class" /></xsl:attribute> 17 <xsl:attribute name="package"><xsl:value-of select="@package" /></xsl:attribute> 18 <xsl:attribute name="content-desc"><xsl:value-of select="@content-desc" /></xsl:attribute> 19 <xsl:attribute name="checkable"><xsl:value-of select="boolean(@checkable)" /></xsl:attribute> 20 <xsl:attribute name="checked"><xsl:value-of select="boolean(@checked)" /></xsl:attribute> 21 <xsl:attribute name="clickable"><xsl:value-of select="boolean(@clickable)" /></xsl:attribute> 22 <xsl:attribute name="enabled"><xsl:value-of select="boolean(@enabled)" /></xsl:attribute> 23 <xsl:attribute name="focusable"><xsl:value-of select="boolean(@focusable)" /></xsl:attribute> 24 <xsl:attribute name="focused"><xsl:value-of select="boolean(@focused)" /></xsl:attribute> 25 <xsl:attribute name="scrollable"><xsl:value-of select="boolean(@scrollable)" /></xsl:attribute> 26 <xsl:attribute name="long-clickable"><xsl:value-of select="boolean(@long-clickable)" /></xsl:attribute> 27 <xsl:attribute name="password"><xsl:value-of select="boolean(@password)" /></xsl:attribute> 28 <xsl:attribute name="selected"><xsl:value-of select="boolean(@selected)" /></xsl:attribute> 29 <xsl:attribute name="bounds"><xsl:value-of select="@bounds" /></xsl:attribute> 30 <xsl:apply-templates /> 31 </node> 32 </xsl:template> 33 </xsl:transform>