It’s too bad those two things … entity expansion and validation … got
tied together since they are really separate things. Entity expansion gets
used as an include mechanism. It’s easy to see how one might want to use
that, but not care about validation.
The rexml included with 1.8-preview3 doesn’t expand
external entities.
Has this been added in a more recent version, or is it
otherwise planned?
Otherwise how may I expand them?
REXML is not a validating parser, and therefore is not required to
expand external entities. REXML may expand external entities in the
future, but I wouldn’t hold your breath.
A.G. Edwards & Sons’ outgoing and incoming e-mails are electronically
archived and subject to review and/or disclosure to someone other
than the recipient.
It’s too bad those two things … entity expansion and validation …
got tied together since they are really separate things. Entity
expansion gets used as an include mechanism. It’s easy to see how one
might want to use that, but not care about validation.
Exactly my need. Sean, if I locate the external file, do I need to
do anything special to load it? Because then I could add any entities
defined in it to the loaded rexml tree and they should get expanded as
if they were internal entities. Can you give an example or some hints
on how to do this? I’m kinda stuck with external entities, as we’re
using the one XML file for generating code (ruby program) and now our
documentation team want to include entities which expand differently
for this purpose (different include file) than for code-generation.
mysession = SystemShell.new //Would I open a pipe? Would it be a IO.new?
dir_list = mysession.puts( “ls -al” ) //on Linux
dir_list = mysession.puts( “dir” ) //on Windows
And so on. Does this make sense. Basically I am looking to be able to keep a
session open with the system and receive it’s output. This would prove
beneficial in the case that I ssh into several server and gather data from
each server in my script. Any ideas?
mysession = SystemShell.new //Would I open a pipe? Would it be a IO.new?
dir_list = mysession.puts( “ls -al” ) //on Linux
dir_list = mysession.puts( “dir” ) //on Windows
How about using Dir.entries( “.” ) - this is more portable and likely
faster, too.
mysession = SystemShell.new //Would I open a pipe? Would it be a IO.new?
dir_list = mysession.puts( “ls -al” ) //on Linux
dir_list = mysession.puts( “dir” ) //on Windows
And so on. Does this make sense. Basically I am looking to be able to keep a
session open with the system and receive it’s output. This would prove
beneficial in the case that I ssh into several server and gather data from
each server in my script. Any ideas?
I’ve never used it, but does shell.rb in the standard lib do what you want?