Reputation: 36654
For a document which has a DOCTPYE declaration like
<!DOCTYPE RootElement SYSTEM "file.dtd">
Delphi 2009, using MSXML, reports that the systemId is empty (""):
Assert(Doc.DOMDocument.doctype.systemId <> ''); // fails!
while
Assert(Doc.DOMDocument.doctype.name = 'RootElement'); // ok
correctly verifies that the DOCTYPE name id "RootElement".
Is this a bug in Delphi (or my code) or am I using a version of MSXML which does not support this property?
Upvotes: 2
Views: 324
Reputation: 536389
MSXML's DocumentType implementation is completely missing the DocumentType properties publicId
, systemId
and internalSubset
. MSDN api ref; the missing properties are specifically called out in MS-DOM2CX.
If you need this information you might have to try a different DOM implementation. Here's one. If you can use .NET classes, System.Xml supports it too.
Upvotes: 1
Reputation: 37211
In case ProhibitDTD property is True try setting it to False.
Here's an article with more details.
Upvotes: 0