Linutronix / elbe

Embedded Linux Build Environment
https://elbe-rfs.org
GNU General Public License v3.0
163 stars 59 forks source link

How to echo xml tag to file via finetuning <command>? #359

Closed coveritytest closed 1 year ago

coveritytest commented 1 year ago

I need to echo quite a lot of stuff to some config files, for example:

<command>echo '<?xml version="1.0"?>' >> /etc/test/file.conf</command>

This ends up in the error:

XML Parse error
XML declaration allowed only at the start of the document, line 200, column 29 (test.xml, line 200)

I also tried to use

<command>
cat <<EOF >> /etc/test/file.conf
<?xml version="1.0"?>
EOF
</command>

which ends up in

XML Parse error
StartTag: invalid element name, line 201, column 6 (test.xml, line 201)

How is this supposed to work?

bgermann commented 1 year ago

You have to use XML entities for less than and greater than,