Home Forums General XMetaL Discussion ActiveDocument.doctype returns empty string Reply To: ActiveDocument.doctype returns empty string

Derek Read

Reply to: ActiveDocument.doctype returns empty string

This API and many others cannot be used in Plain Text view. There is no XML DOM when viewing documents in Plain Text view so any APIs that return information about the schema or the XML DOM will fail or return nothing.

The DOM is only available in Tags On view and Normal view. It is created when you load a document from file into one of those views or when you switch from Plain Text view into one of those views.

If you need to know what this value is for a script running in Plain Text view you will need to find it via some other means. Perhaps you could store it when the view is in Tags On or Normal view. If not then you may need to parse the XML as a string to locate it or load the XML into an external XML parser or through some other means.

Reply

Products
Downloads
Support