B
billybobsonic
Guest
I have written a SSIS package that uses an xml source (saved as .XSD)
I made a normal package that just brought back data for countries from a HTTP website
the one I have is HTTPS hence I am getting DTD error.
Continue reading...
I made a normal package that just brought back data for countries from a HTTP website
the one I have is HTTPS hence I am getting DTD error.
As it HTTPS I don't know how to amend my script task to authenticate the username and password. I am only basic with SSIS . Please see 1. coding , myself trying is currently // out.
is the XML file saved as and XSD file type, code provided below. What can I add to the xml code to stop the DTD error
public void Main() {
string xmlDoc = String.Empty;
try
{
// Get the URL from the variable
string url = Dts.Variables["User::URL"].Value.ToString();
// Get the Email from the variable
// string Email = Dts.Variables["User::username"].Value.ToString(); // Get the Password from the variable //string Password = Dts.Variables["User:assword"].Value.ToString();
//Create a Web Client
using (WebClient client = new WebClient())
{
//Download the xml document as a string
xmlDoc = client.DownloadString(url);
}
// Set the value of the xmlDocument to the string that was just downloaded
Dts.Variables["User::xmlDoc"].Value = xmlDoc;
Dts.TaskResult = (int)ScriptResults.Success;
}
catch
{
Dts.TaskResult = (int)ScriptResults.Failure;
}
}
please help 2.
Here is the start of my xml document ..saved as xsd
<?xml version="1.0" encoding="UTF-8" ?>
<xs:schema xmlns:xs="XML Schema">
<xs:element name="events">
Continue reading...