All,
I have an XML document with an external parameter entity in the doctype. When I use toString on the XML::LibXML document object, this entity is being expanded in the doctype. Is there any way to turn expansion off on such entities? I am alreadying turning off the expand_entities option, and it works throughout the rest of the document, but this seems not to impact the the doctype tag.
Here is some sample XML, demonstrating what I am talking about:
<?xml version="1.0" standalone="no"?> <!DOCTYPE student [ <!ENTITY % student SYSTEM "http://www.university.com/student.dtd"> %student; ]>
Using the provided example, "%student;" is being replaced by the contents of the entity when I print out the document. I would like to be able to print the doctype tag in the same format that it was provided (i.e. unexpanded).
Here are the parameters that I am passing to the LibXML parser:
$parser->line_numbers(1); $parser->validation(0); $parser->load_ext_dtd(1); $parser->expand_entities(0);
Please let me know if there is any other information that I could provide that would prove useful, and thanks for your consideration.
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |