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?
MSXML’s DocumentType implementation is completely missing the DocumentType properties
publicId,systemIdandinternalSubset. 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.