uncovery
uncovery

Reputation: 878

Reading XML with PHP, including DTD entities?

I am trying to read a 40MB large XML with PHP's XMLReader but I cannot get the contents of fields such as:

<pos>&n;</pos>
<misc>&abbr;</misc>

they have definitions in the file such as:

<!ENTITY abbr "abbreviation">
<!ENTITY n "noun (common) (futsuumeishi)">

but how to I get them to be displayed?

thanks!

Upvotes: 1

Views: 792

Answers (1)

Marc B
Marc B

Reputation: 360782

Try the XMLReader::SUBST_ENTITIES option as documented on this page.

Upvotes: 2

Related Questions