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

后端 未结 9 1187
青春惊慌失措
青春惊慌失措 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:43

    Setting Xerces switches only works if you are using Xerces. An entity resolver works for any JAXP parser.

    There are more generalized entity resolvers out there, but this implementation does the trick when all I'm trying to do is parse valid XHTML.

    http://code.google.com/p/java-xhtml-cache-dtds-entityresolver/

    Shows how trivial it is to cache the DTDs and forgo the network traffic.

    In any case, this is how I fix it. I always forget. I always get the error. I always go fetch this entity resolver. Then I'm back in business.

提交回复
热议问题