You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-users@xerces.apache.org by "Dantzler, DeWayne C" <de...@boeing.com> on 2009/10/23 03:49:08 UTC

Getting xerces-c-3.0.1 and libcurl to play together

The problem is that there is a proxy between Xerces and the outside world and I need Xerces to perform XML validation
against a schema which includes online references to an external schema 
(e.g <xs:import  > namespace="http://www.w3.org/myspace schemaLocation="http://www.w3.org/schema.xsd"/>.

I built Xerces 3.0.1 to use libcurl(--enable-netaccessor-curl). Now, I assume Xerces has an API which wraps libcurl's
API to allow Xerces to set the proxy host and port similar to what Xerces-j does to set system properties: "http.proxyHost" and "http.proxyPort". Can someone point me to the documentation on this API? Otherwise, why compile Xerces to use libcurl?  

Here's how Xerces-j handles this use case:
$ java -Dhttp.proxyHost="www-stl-proxy4.MyProxy.com" -Dhttp.proxyPort="8160" -classpath SimpleParser.jar;xercesImpl.jar JavaXMLParse filename.xml filename.dtd

In a nutshell,how can I do this with Xerces-C++ using libcurl?

RE: Getting xerces-c-3.0.1 and libcurl to play together

Posted by "Dantzler, DeWayne C" <de...@boeing.com>.
ok, can someone explain to me if Xerces is configured to compile with libcurl(--enable-netaccessor-curl)how Xerces uses
this library? Otherwise, under what condition would it be necessary to do this? 

Thanks



Re: Getting xerces-c-3.0.1 and libcurl to play together

Posted by David Bertoni <db...@apache.org>.
Dantzler, DeWayne C wrote:
> The problem is that there is a proxy between Xerces and the outside world and I need Xerces to perform XML validation
> against a schema which includes online references to an external schema 
> (e.g <xs:import  > namespace="http://www.w3.org/myspace schemaLocation="http://www.w3.org/schema.xsd"/>.
> 
> I built Xerces 3.0.1 to use libcurl(--enable-netaccessor-curl). Now, I assume Xerces has an API which wraps libcurl's
> API to allow Xerces to set the proxy host and port similar to what Xerces-j does to set system properties: "http.proxyHost" and "http.proxyPort". Can someone point me to the documentation on this API? Otherwise, why compile Xerces to use libcurl?  
> 
> Here's how Xerces-j handles this use case:
> $ java -Dhttp.proxyHost="www-stl-proxy4.MyProxy.com" -Dhttp.proxyPort="8160" -classpath SimpleParser.jar;xercesImpl.jar JavaXMLParse filename.xml filename.dtd
> 
> In a nutshell,how can I do this with Xerces-C++ using libcurl?
See this page for more information about using environment variables for 
libcurl:

http://curl.haxx.se/libcurl/c/libcurl-tutorial.html

For what I can see from the code, there's no Xerces-C specific way to 
set proxy information. If you think this would be a valuable feature, 
please open a feature request in Jira.

Dave