If you want to stay with 2.7, you should recompile Xerces with the libwww NetAccessor; then in your code use the libwww API for registering a proxy (I think it is HTProxy_add) and at that point I think you should be able to load URLs.

Alberto

Dantzler, DeWayne C wrote:
Alberto

Do I need to recompile Xerces to support netaccessor and does this require 
upgrading Xerces from 2.7.0 to 3.0.1?
I have confirmed that my entity resolver is being called. Now, is there away in 
Xerces to specify the proxy and port like
proxyHost="use-this-proxy" and proxyPort="use-port"? I would rather use Xerces 
to handle the entity resolution if at all possible.

Thanks for your assistance
DeWayne Dantlzer


-----Original Message-----
From: Alberto Massari [mailto:[email protected]] Sent: Wednesday, September 23, 2009 11:14 PM
To: [email protected]
Subject: Re: How to get Xerces to recognize external entity callouts

Dantlzer,
you are providing your own entity resolver, so Xerces will call you to fetch 
the external entity; try adding a few debugging traces to verify that you are 
indeed called and that you are able to resolve the given URL.
In any case, as you are behind a proxy, you should manually retrieve the entity 
(using whatever feature your platform provides - WinHTTP for Windows, cUrl for 
Unix..) and wrap it in a MemBufInputSource object.

Alberto

Dantzler, DeWayne C wrote:
HI Alberto

I ran across a reference(link below) given by you a few years ago on a similar 
problem which I think is related to mine.
http://marc.info/?l=xerces-c-users&m=118373267604850&w=2

I forgot to mention that I'm also behind a firewall and need to access our 
company's proxy. I don't know if a NetAccessor was compiled in our version of 
Xerces. How can I verify this? Also, here is how I'm invoking the parser.

Thanks

Code snippet
----------------------------------------------------------------
_XmlDOMParser->setEntityResolver(resolver);
_XmlDOMParser->setValidationScheme(_XmlDOMParser->Val_Always);
_XmlDOMParser->setDoSchema(false);
_XmlDOMParser->parse(xmlDoc2Parse);


DeWayne Dantlzer


-----Original Message-----
From: Alberto Massari [mailto:[email protected]]
Sent: Wednesday, September 23, 2009 12:05 AM
To: [email protected]
Subject: Re: How to get Xerces to recognize external entity callouts

Hi,
how are you invoking the parsing? Maybe you disabled external enitity 
resolution, or you didn't compile a NetAccessor inside Xerces.

Alberto

Dantzler, DeWayne C wrote:
Hello guys

I'm getting Xerces parse errors and I believe it is because the entity callouts 
can not be located(see below). How do I get Xerces to follow the URL in the 
entity callout to resolve this. I'm running Xerces 2.7.0 and not sure if this 
feature is supported. Do I need to upgrade Xerces?


Snippet of the xml file
---------------------------------------------------------------------
-
----------------------------------
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE mpd SYSTEM "mpboe03.dtd" [ <!ENTITY % isobox PUBLIC "-//W3C//ENTITIES Box and Line Drawing//EN//XML" "http://www.w3.org/2003/entities/2007/isobox.ent"; > %isobox; <!ENTITY % isoamsc PUBLIC "-//W3C//ENTITIES Added Math Symbols: Delimiters//EN//XML" "http://www.w3.org/2003/entities/2007/isoamsc.ent"; > %isoamsc;


DeWayne Dantlzer





Reply via email to