curl-library
Re: XML request posting
Date: Sat, 19 Apr 2003 13:33:32 +0000
Naved Khan wrote:
> curl -v --header "Content-type: text/xml" -d
> "Servername=abc&Username=XXX&Password=xxx&AcknowledgementTo=abc_at_xyz.com&XML=
> <?xml version = "1.0" encoding = "UTF-8"?><!DOCTYPE Naved SYSTEM
> "Naved.dtd"><Connect><GetObjNames><Depth>CAMP</Depth><ClientName>Orbit</Clie
> ntName></GetObjNames></Connect>" https://server/myconnect.exe -k
>
> I get the following error from the server side XML (Xerces) parser:
> "Error: Expected quoted string"
I believe that your problem is a command-prompt/shell problem.
Your XML document contains quotes. The command-prompt cannot distinguish
between the quotes in your document and the surrounding quotes for the
-d argument. It will therefore terminate the document at the first embedded
quote (after ''<?xml version = ''.)
The solution is to escape the embedded quotes. Exactly how this must be
done depends on your command-prompt. However, a good guess is to preceed
every embedded quote with a backslash, i.e. ''<?xml version = \"1.0\"''.
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
Received on 2003-04-20