Take the 2-minute tour ×

I have a bunch of XML files that reference entities declared in separate files that look like this:

<!ENTITY Seealso           "See also">
<!ENTITY Date              "Date:">
<!ENTITY GettingStarted    "Getting Started">
<!ENTITY InstallAndConfigure "Installation and Configuration">
<!ENTITY Installation      "Installation">
<!ENTITY Features          "Features">
<!ENTITY Security          "Security">
<!-- .... -->

there is no other markup (no <!DOCTYPE blahblah [ or kind of), just a lots of declarations.

How do i fed them to Nokogiri? I've tried direct parsing, but it throws errors :(

I'm using SAX parser so I thought maybe it can somehow ask user code for entity dereferencing, but i didn't find any callbacks for that :(

So how do I parse such thing?

share|improve this question
What code are you using? What errors are you getting? Can you provide sample content you want to extract? –  Mark Thomas Nov 26 '12 at 17:23
add comment


Your Answer



Browse other questions tagged or ask your own question.