using backticks with xml

C

Corbin

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?
 
R

Rodrigo Bermejo

Corbin said:
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,049
Latest member
Allen00Reed

Latest Threads

Top