PL/SQL (MOSC)

MOSC Banner

How do you pass an ampersand (&) through UTL_HTTP?

Hello,

I'm writing a PL/SQL package that connects to an API, and when I send data that includes an ampersand (&) it appears that the body of the request I'm sending cuts off at that point.

The data being sent is in XML format. As an example, if I send this data:

<Event>

  <Address>

     <AddrLine1>130 SOUTH MAIN ST</AddrLine1>

      <AddrLine2>ROOM 140 & 142</AddrLine2>

     <City>ST LOUIS</City>

     <State>MO</State>

     <Zip>63106</Zip>

     <Country>US</Country>

  </Address>

</Event>

I get this error back from the API:

XML is invalid: Unexpected end of file has occurred. The following elements are not closed: AddrLine2, Address, Event

Tagged:

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center