Skip to content

DTD заблокировано в чтении Xml #1585

Description

@dmpas

При попытке прочитать XML, который содержит в себе DOCTYPE выскакивает ошибка:

For security reasons DTD is prohibited in this XML document. To enable DTD processing set the DtdProcessing property on XmlReaderSettings to Parse and pass the settings into XmlReader.Create method.

Пример XML:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE example SYSTEM "Example.dtd">
<xml xmlns:ns="ns" attr="1" ns:attr="value">
    <ns:data inner="123" inner2="456" inner3="789">Some Text</ns:data>
</xml>

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions