Parsing XML files as text with collection()

"Imsieke, Gerrit, le-tex" <[email protected]> Fri, 9 Oct 2020 14:31:13 +0200
Newsgroups gmane.text.xml.saxon.help
Organization le-tex publishing services GmbH
Message-ID <[email protected]>
Hi,

I want a recursive directory scan to read in all XML files as unparsed 
text. Then I want to remove the DOCTYPE declaration and named entities 
with replace(). Then I want to parse them with parse-xml(). The reason 
is that all kinds of DTDs at different locations will be referred, but I 
don't have access to these DTDs, and they don't matter for the purpose 
of my analysis.

The documentation says that Saxon will use heuristics to infer the type 
of file. How can I force Saxon to read every *.xml file, although it may 
appear as an XML document, as text?

Gerrit

-- 
Gerrit Imsieke
Geschäftsführer / Managing Director
le-tex publishing services GmbH
Weissenfelser Str. 84, 04229 Leipzig, Germany
Phone +49 341 355356 110, Fax +49 341 355356 510
[email protected], http://www.le-tex.de

Registergericht / Commercial Register: Amtsgericht Leipzig
Registernummer / Registration Number: HRB 24930

Geschäftsführer / Managing Directors:
Gerrit Imsieke, Svea Jelonek, Thomas Schmidt


_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
[email protected]
https://lists.sourceforge.net/lists/listinfo/saxon-help