uspTukubaiコマンドに関する様々な資料がここにあります。

 

 

魂内検索

DOCUMENTS

COMMAND

FORUM

UEC DOCS

VIDEO

 

Alphabetical list

(Video materials in preparation)

xb(USP)

Name

xb : XML beautifier

Synopsis

Usage   : xb <xmlfile>

Version : Tue Jan  9 09:02:34 JST 2024

Edition : 1

Descrition

Bad XML file, such as one with bad return code or bad alignment, is

beautified.  "xb" also deletes blank record, puts one directory-tag

or file-tag or independent-tag on one line.

Example 1

$ cat xml1

<?xml aaa="aaa"

bbb="bbb" ?>

<top/>

<!-- coment -->

<dir1 id1="0"

id2="1"><!-- comment --><dir2 id="a">

<!-- comment --><file attr="001">xxx</file><!-- comment  -->

<file attr="002">yyy</file>

<file attr="003">zzz</file> </dir2>

<dir2 id="b"> <file attr="004">XXX</file> <file attr="005">YYY</file>

</dir2>

</dir1>

       <tail/>

$ xb xml1

<?xml aaa="aaa" bbb="bbb" ?>

<top/>

<!-- coment -->

<dir1 id1="0" id2="1">

<!-- comment -->

<dir2 id="a">

<!-- comment -->

<file attr="001">xxx</file>

<!-- comment -->

<file attr="002">yyy</file>

<file attr="003">zzz</file>

</dir2>

<dir2 id="b">

<file attr="004">XXX</file>

<file attr="005">YYY</file>

</dir2>

</dir1>

<tail/>

Example 2

End-tag immediately after start-tag is regarded as file-tag.

$ cat xml2

<dir><a></a></dir>

$ xb xml2

<dir>

<a></a>

</dir>

Example 3

Independent-tag inbetween file-tags is regarded as a value of

file-tag.

$ cat xml3

<dir><a>abc<br/>def</a></dir>

$ xb xml3

<dir>

<a>abc<br/>def</a>

</dir>