Inline DTD with Builder
How would I create this...
<!DOCTYPE root-element[
<!ENTITY % w3centities PUBLIC
"-//W3C//ENTITIES Combi开发者_Python百科ned Set//EN//XML"
"w3centities.ent"
>
%w3centities;
]>
...using Builder?
I can manage everying apart from the "%w3centities;" in the second to last line with the following code:
xml.declare! :DOCTYPE, "root-element" do
xml.declare! :ENTITY, "%", :w3entities, :PUBLIC,
"-//W3C//ENTITIES Combined Set//EN//XML",
"w3centities.ent"
end
Thanks
Here's what I did to get it to work...
xml.target! << "<!DOCTYPE root-element[
<!ENTITY % w3centities PUBLIC
\"-//W3C//ENTITIES Combined Set//EN//XML\"
\"w3centities.ent\"
>
%w3centities;
]>"
精彩评论