0
私のpythonと(2.7)スクリプトがlxml
ライブラリを使用して、次のXMLを出力している:スプリット長いXMLタグlxmlの
<Button android:id="@+id/button1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="17dp" android:layout_marginTop="16dp" android:text="Button"/>
私は、複数行で出力をする属性ごとに1つずつたいと思います:
<Button
android:id="@+id/button1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="17dp"
android:layout_marginTop="16dp"
android:text="Button" />
lxmlで使用されるトランスシリアライザ実装のドキュメントを探し、これを制御できるパラメータがあるかどうかを判断する必要があります。私は非常にそれを疑う。 –
@ JimGarrisonの提案に感謝します。私はlxmlドキュメントを調べましたが、これに関する情報は見つかりませんでした。私は簡単にタグの後に文字列を操作することができますが、私は属性の後に文字列で制御することはできません。私は 'write()'関数で 'method'パラメータをカスタマイズできるかどうかを調べるためにソースコードを調べましたが、何も得られませんでした。 –