[libxml-devel] How to expand entities?

Charlie Savage cfis at savagexi.com
Fri Feb 6 16:53:27 EST 2009


> How can I expand the entities in a document using this library?

Globally:

XML.default_substitute_entities = true

Per parse run (only for 0.9.8 and higher):

parser = XML::Parser.string('...', :options => XML::Parser::Options::NOENT)

doc = parser.parse

See the rdocs for all the other parser options you can use.

Charlie
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3237 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://rubyforge.org/pipermail/libxml-devel/attachments/20090206/22abd16d/attachment-0001.bin>


More information about the libxml-devel mailing list