Re: Parsing XML files as text with collection()

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

On 09.10.2020 15:03, John Lumley wrote:
> On 09/10/2020 13:31, Imsieke, Gerrit, le-tex wrote:
>> 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
>>
> What about coding using EXpath.file functions?

Ok, if there's no way with collection(), I will use them. Thanks John.