HTML_Parser for last response Exception on Parse text from xml filter
search cancel

HTML_Parser for last response Exception on Parse text from xml filter

book

Article ID: 68629

calendar_today

Updated On: 03-10-2025

Products

CA Application Test CA Continuous Application Insight (PathFinder)

Issue/Introduction

We have a XML response. When we use the "parse text from xml " filter we are getting the exception as HTML_Parser for last response.

 

 

Environment

All supported Devtest versions

Cause

Noticed that, in XML response one of the XML tag has special character and there are long spaces in that tag, due to these special characters, getting an error as below

    ============================================================================

| Exception: 

============================================================================

| Message:     Exception attempting to construct HTML_Parser for last response.

----------------------------------------------------------------------------

| Trapped Exception: An invalid XML character (Unicode: 0x1) was found in the element content of the document.

| Trapped Message:   org.xml.sax.SAXParseException: An invalid XML character (Unicode: 0x1) was found in the element content of the document.

----------------------------------------------------------------------------

Resolution

Convert special characters to utf8 character set using scriptable assertion or Javascript step and make it as well formed XML Then apply the assertion to resolve this.

We can validate XML against XPATH filter from URI http://www.freeformatter.com/xpath-tester.html