Retourner au contenu associé (dépêche : YAML 1.2 est disponible !)
Posté par thoasm le 31 juillet 2009 à 11:44. En réponse à la dépêche YAML 1.2 est disponible !. Évalué à 2.
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル
[^] # Re: CPAN de Perl
Posté par thoasm . En réponse à la dépêche YAML 1.2 est disponible !. Évalué à 2.
Tiens genre http://xmlstar.sourceforge.net/doc/UG/ch04s03.html
Exemples :
# Rename elements
xml ed -r "/xml/table/rec" -v record xml/tab-obj.xml
Output:
<xml>
<table>
<record id="1">
<numField>123</numField>
<stringField>String Value</stringField>
<object name="Obj1">
<property name="size">10</property>
<property name="type">Data</property>
</object>
</record>
<record id="2">
<numField>346</numField>
<stringField>Text Value</stringField>
</record>
<record id="3">
<numField>-23</numField>
<stringField>stringValue</stringField>
</record>
</table>
</xml>
EXAMPLE
# Update value of an attribute
xml ed -u "/xml/table/rec[@id=3]/@id" -v 5 xml/tab-obj.xml
Output:
<xml>
<table>
<rec id="1">
<numField>123</numField>
<stringField>String Value</stringField>
<object name="Obj1">
<property name="size">10</property>
<property name="type">Data</property>
</object>
</rec>
<rec id="2">
<numField>346</numField>
<stringField>Text Value</stringField>
</rec>
<rec id="5">
<numField>-23</numField>
<stringField>stringValue</stringField>
</rec>
</table>
</xml>