Reputation: 931
I'm trying to read and XML in ORACLE using XMLTYPE.
I get the msg LPX-00210: expected '"' instead of '\' when using the the below xml.
<?xml version=\"1.0\" encoding=\"utf-16\"?>
<arrayofaccesstoken xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\">
<accesstoken>
<id>0</id>
<controller>fs</controller>
<view>fview</view>
<role>1000</role>
<rights>30</rights>
</accesstoken>
The code work perfectly fine when the first tow lines
<?xml version=\"1.0\" encoding=\"utf-16\"?>
<arrayofaccesstoken xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\">
are omitted.
Upvotes: 0
Views: 2566
Reputation: 1371
You don't have to escape double quotes in an oracle string since all strings in oracle are enclosed by single quotes.
This XML should work fine.
<?xml version="1.0" encoding="utf-16"?>
<arrayofaccesstoken xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<accesstoken>
<id>0</id>
<controller>fs</controller>
<view>fview</view>
<role>1000</role>
<rights>30</rights>
</accesstoken>
</arrayofaccesstoken>
Other things I fixed -
Upvotes: 2