← Prev in month ← Prev in thread

Concatenating XML files (was Re: [xml-dev] 2007 Predictions)

From
David Megginson <>
To
xml-dev <>
Date
2007-01-12T14:52:59Z
ID
<>
Thread
Concatenating XML files (was Re: [xml-dev] 2007 Predictions)
On 12/01/07, Rick Marshall <> wrote:

> PS and technically I'd like to see the root element dispensed with so
> that I can eg store XML fragments as valid XML in lots of files and
> easily combine them into usable xml (using a high tech tool like cat..)

Since that may never happen with XML, you might want to hedge your
bets by learning the advanced echo (1) technology as well:

 $ echo '<foo>' > mydocument.xml
 $ cat fragments/*.xml >> mydocument.xml
 $ echo '</foo>' >> mydocument.xml

(That's assuming that none of your XML files has an XML declaration.)


All the best,


David
← Prev in month ← Prev in thread