Question
· May 20, 2018

https config error xml.reader

Hi

on this code

set reader=##class(%XML.Reader).%New()
    set statuscode=reader.OpenFile(file)
    if $$$ISERR(statuscode) {do $System.Status.DisplayError(statuscode) quit $$$NULLOREF}

I got this error "unable to open file 'https://www.musicxml.org/dtds/partwise.dtd'"

or using the xml schema wisard i got the error  https is active but no configuration found.

where do I have configure it?

Discussion (5)1
Log in or sign up to continue

It's a url not a file so you need to use OpenURL for that:

set reader=##class(%XML.Reader).%New()
set httprequest=##class(%Net.HttpRequest).%New()
set httprequest.SSLConfiguration="...."
set status=reader.OpenURL("https://.....",,httprequest)

But as @Robert.Cemper pointed out it's a dtd file and so would not be parsed by XML reader.

If you want to generate classes automatically from XML schema, you'll need XSD files. Documentation.