Turn off DTD validation for scala.xml.XML [duplicate]
问题 This question already has answers here : Ignore DTD specification in scala (3 answers) Closed 6 years ago . I want to load an XML document from an InputStream in Scala. Therefore I am using scala.xml.XML.load(is: InputStream): scala.xml.Elem . The XML document is a SVG file that comes from Potrace and looks like this: <?xml version="1.0" standalone="no"?> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd"> <svg version="1.0" xmlns=