C
Chris Dunaway
I am processing cXml orders and the xml begins with the following:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE cXML SYSTEM "http://xml.cxml.org/schemas/cXML/1.2.017/
cXML.dtd">
I am attempting to use the following code to transform the xml:
XslCompiledTransform transform = new XslCompiledTransform();
Stream resultStream = new MemoryStream();
XmlReader xslRdr = XmlReader.Create(new StringReader(xslSheet));
transform.Load(xslRdr);
XmlReaderSettings xRdrSettings = new XmlReaderSettings();
xRdrSettings.ProhibitDtd = false;
xRdrSettings.ValidationType = ValidationType.DTD;
XmlReader xmlRdr = XmlReader.Create(cxmlFilename, xRdrSettings);
transform.Transform(xmlRdr, null, resultStream);
My problem is that in my organization, my test machine cannot access
the url in the DOCTYPE without proxy authentication. I get this
exception when running the code:
"An error has occurred while opening external DTD 'http://xml.cxml.org/
schemas/cXML/1.2.017/cXML.dtd': The remote server returned an error:
(407) Proxy Authentication Required."
Can anyone point me to some examples of how to apply the proxy
authentication?
I attempted to create an XmlUriResolver with the proper proxy
credentials, and passed that into the XmlReaderSettings.XmlResolver
property, but that made no difference. I must be missing something
easy.
Any help would be appreciated.
Thanks,
Chris
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE cXML SYSTEM "http://xml.cxml.org/schemas/cXML/1.2.017/
cXML.dtd">
I am attempting to use the following code to transform the xml:
XslCompiledTransform transform = new XslCompiledTransform();
Stream resultStream = new MemoryStream();
XmlReader xslRdr = XmlReader.Create(new StringReader(xslSheet));
transform.Load(xslRdr);
XmlReaderSettings xRdrSettings = new XmlReaderSettings();
xRdrSettings.ProhibitDtd = false;
xRdrSettings.ValidationType = ValidationType.DTD;
XmlReader xmlRdr = XmlReader.Create(cxmlFilename, xRdrSettings);
transform.Transform(xmlRdr, null, resultStream);
My problem is that in my organization, my test machine cannot access
the url in the DOCTYPE without proxy authentication. I get this
exception when running the code:
"An error has occurred while opening external DTD 'http://xml.cxml.org/
schemas/cXML/1.2.017/cXML.dtd': The remote server returned an error:
(407) Proxy Authentication Required."
Can anyone point me to some examples of how to apply the proxy
authentication?
I attempted to create an XmlUriResolver with the proper proxy
credentials, and passed that into the XmlReaderSettings.XmlResolver
property, but that made no difference. I must be missing something
easy.
Any help would be appreciated.
Thanks,
Chris