org.w3c.dom.DOMException: INVALID_CHARACTER_ERR: An invalid or illegal XML character is specified.

GitHub | dbenesj | 7 months ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    exception on W3CDOM fromJSoup() in case attribute with invalid characters

    GitHub | 7 months ago | dbenesj
    org.w3c.dom.DOMException: INVALID_CHARACTER_ERR: An invalid or illegal XML character is specified.

    Root Cause Analysis

    1. org.w3c.dom.DOMException

      INVALID_CHARACTER_ERR: An invalid or illegal XML character is specified.

      at com.sun.org.apache.xerces.internal.dom.CoreDocumentImpl.createAttribute()
    2. Java RT
      ElementImpl.setAttribute
      1. com.sun.org.apache.xerces.internal.dom.CoreDocumentImpl.createAttribute(CoreDocumentImpl.java:611)
      2. com.sun.org.apache.xerces.internal.dom.ElementImpl.setAttribute(ElementImpl.java:498)
      2 frames
    3. jsoup
      W3CDom.fromJsoup
      1. org.jsoup.helper.W3CDom$W3CBuilder.copyAttributes(W3CDom.java:124)
      2. org.jsoup.helper.W3CDom$W3CBuilder.head(W3CDom.java:92)
      3. org.jsoup.select.NodeTraversor.traverse(NodeTraversor.java:31)
      4. org.jsoup.helper.W3CDom.convert(W3CDom.java:66)
      5. org.jsoup.helper.W3CDom.fromJsoup(W3CDom.java:46)
      5 frames
    4. Unknown
      JSoupException.main
      1. JSoupException.main(JSoupException.java:14)
      1 frame