Is Scala/Java not respecting w3 “excess dtd traffic” specs?

后端 未结 9 1178
青春惊慌失措
青春惊慌失措 2021-02-01 07:40

I\'m new to Scala, so I may be off base on this, I want to know if the problem is my code. Given the Scala file httpparse, simplified to:

object Http {
   import         


        
9条回答
  •  遥遥无期
    2021-02-01 08:37

    My knowledge of Scala is pretty poor, but couldn't you use ConstructingParser instead?

      val xml = new java.io.File("xmlWithDtd.xml")
      val parser = scala.xml.parsing.ConstructingParser.fromFile(xml, true)
      val doc = parser.document()
      println(doc.docElem)
    

提交回复
热议问题