1

we are receiving an xml file that looks like this:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<AuditResponse xmlns="http://www.tibco.com/MFT/JMS-XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.tibco.com/MFT/JMS-XMLSchema C:\MFTIS\server\webapps\cfcc\WEB-INF/xsds/AuditResponse.xsd">
<ResponseType>TransferNotificationComplete</ResponseType>
<NumRecords>1</NumRecords>
   <AuditRecord>
      <AuditType>InternetServer</AuditType>
      <AuditID>A62540000004</AuditID>
      <CKPTInterval>5</CKPTInterval>
   </AuditRecord>
</AuditResponse>

However, we we try to parse the file it fails because of "invalid URI character '\' is not allowed.

Is backslash not allowed within the xsi:schemaLocation attribute?

Thanks!

user955732
  • 1,330
  • 3
  • 21
  • 48

1 Answers1

2

schemaLocationis defined to contain pairs of URIs, and \ is an excluded character according to RFC 2396. So, yes, the parser is kind of correct to barf on it. \ can be escaped, though.

forty-two
  • 12,204
  • 2
  • 26
  • 36