开发者

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;  
]>"
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜