Can REXML handle long XML


#1

I have a long chunk of XML - about 32k. REXML::Document.new(x) gives
me an “”. Yet I double checked the xml in a validator (by
File.write x into a file, and then loading it), and it validates fine.

Any ideas?


#2

On Mar 7, 2006, at 6:38 AM, removed_email_address@domain.invalid wrote:

I have a long chunk of XML - about 32k. REXML::Document.new(x) gives
me an “”. Yet I double checked the xml in a validator (by
File.write x into a file, and then loading it), and it validates fine.

Any ideas?

That’s just what a REXML::Document object returns when you call
#inspect.

require ‘rexml/document’
xml =<<EOS

test
blah

EOS
doc = REXML::Document.new(xml)
p doc # -> … </>
puts doc # -> the xml…
puts REXML::XPath.match( doc, “//node/xml” ) # -> test

– Daniel


#3

On 6 Mar 2006 21:34:09 -0800, removed_email_address@domain.invalid wrote:

I have a long chunk of XML - about 32k. REXML::Document.new(x) gives
me an “”. Yet I double checked the xml in a validator (by
File.write x into a file, and then loading it), and it validates fine.

Any ideas?

Definitely not the length. I used REXML to load a 500K one-line (no
CRs)
MS Project export, with no problems.

Jay L.