开发者

Creating DOM XML - trying to resolve the 'nbsp' entity problem

开发者 https://www.devze.com 2023-02-18 02:32 出处:网络
I\'m trying to create XML record. I started with this: $doc = new DomDocument(\'1.0\', \'UT开发者_开发问答F-8\');

I'm trying to create XML record. I started with this:

$doc = new DomDocument('1.0', 'UT开发者_开发问答F-8');

Now I should add this line:

<!DOCTYPE page SYSTEM "http://gv.ca/dtd/character-entities.dtd">

How do I do this?

Chris


Assuming it's PHP, you could consider using DOMImplementation::createDocumentType and DOMImplementation::createDocument. See here

0

精彩评论

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