Skip to Content
0
Jan 20, 2023 at 12:32 PM

Open quote is expected for attribute "xmlns:ns8" associated with an element type "ns8:Messages"

487 Views

Hello Experts,

I am working on a scenario where I need to filter my xml payload. but I am getting below error.

"Open quote is expected for attribute "xmlns:ns8" associated with an element type "ns8:Messages"".

My XML is as below:

<?xml version="1.0" encoding="UTF-8"?>
<ns8:Messages xmlns:ns8=http://sap.com/xi/XI/SplitAndMerge>
<ns8:Message1>
	<ns4:EmployeeReplicationRequest xmlns:ns4=http://sap.com/xi/SAPGlobal20/Global>
	<MessageHeader>
		<Id></Id>
	</MessageHeader>
	<EmployeeReplicationRequest>
		<A></A>
		<B></B>
	</EmployeeReplicationRequest>
	<EmployeeReplicationRequest>
		<A></A>
		<B></B>
	</EmployeeReplicationRequest>
	<EmployeeReplicationRequest>
		<A></A>
		<B></B>
	</EmployeeReplicationRequest>
	</ns4:EmployeeReplicationRequest>
</ns8:Message1>
</ns8:Messages>

I have defined both namespaces (xmlns:ns8 & xmlns:ns4) under Runtime configuration -> Namespace Mapping.

image.png

Filter condition: /p1:Message1

image.png

Error: Invalid xpath: /p1:Message1. Reason: javax.xml.xpath.XPathExpressionException: Failure converting a node of class javax.xml.transform.sax.SAXSource: org.xml.sax.SAXParseException; lineNumber: 2; columnNumber: 25; Open quote is expected for attribute "xmlns:ns8" associated with an  element type  "ns8:Messages".

Please advise where I am mistaken.

Thanks,

Ravi

Attachments

image.png (31.4 kB)
image.png (11.2 kB)