Generating XML in bash, need some efficient ideas

Buxog

New Member
I need to generate an XML file in bash(I am new to bash/scripting languages, despite working on C/C++/UNIX for some time). Right now, I am generating something like this, which is pretty flat\[code\]st='<'et='>'sl='/'-------------------stag() { text=$st$1$et echo $text >> output_file}--------------------etag() { text=$sl$1 stag $text}--------------------attr() { text=$1 echo $text >> output_file}--------------------#--Function Callstag "tag"attr "xml"etag "tag"--------------------#--output<tag>xml</tag>\[/code\]In this, I feel there are lots of chance to make errors and after coding in C++ for so long, I think there should be a better structured way to code.... Any thoughts is appreciated.... or any material you think, I should learn first, plz post here.... Thanks...
 
Back
Top