Using backticks with xml

I don't know why I can't do this but I'd like to use backticks in ruby
to import some xml into a program on the command line.

e.g.

`java -cp myjar.jar Importer %Q{@xml}`

the problem is that the @xml needs to be escaped so that the double
quotes can be placed inside double quotes so that it can be read in
correctly... can this be done?

Corbin wrote:

I don't know why I can't do this but I'd like to use backticks in ruby
to import some xml into a program on the command line.

e.g.

`java -cp myjar.jar Importer %Q{@xml}`

the problem is that the @xml needs to be escaped so that the double
quotes can be placed inside double quotes so that it can be read in
correctly... can this be done?

`java -cp myjar.jar Importer \"#{@xml}\"`

-r.

ยทยทยท

--
Posted via http://www.ruby-forum.com/\.