I am experiencing some problems when constructing a document piece by piece. I have boiled downed the problem to the following code:require 'rubygems' require 'xml/libxml'# Envelope XML xml_string = %{<?xml version="1.0" encoding="UTF-8"?> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> </soapenv:Envelope>} # Create Documentparser = XML::Parser.string(xml_string, :options => XML::Parser::Options::NOBLANKS)
What happens if you first call XML.default_keep_blanks = false? Should do the same thing as the parser option, but worth a quick double check.
And also, take a look at this message from the libxml creator. He strongly discourages the use of NOBLANKS.
http://mail.gnome.org/archives/xml/2007-November/msg00022.html Charlie
smime.p7s
Description: S/MIME Cryptographic Signature
_______________________________________________ libxml-devel mailing list libxml-devel@rubyforge.org http://rubyforge.org/mailman/listinfo/libxml-devel