I have a function that parses an XML file. I need the function updated to parse out the tracking numbers and package IDs and put the into the List trackingNumbersAndPackageIDs.
Each Package object has a Reference5 value that is the ID of the package.
The TrackingNumbers list are the tracking numbers that go with the package IDs. They are both sorted in the same order.
I need the trackingNumbersAndPackageIDs list populated with the Reference5 values and the TrackingNumbers that go with them.
private static void ProcessOutFile(string outFile, XmlDocument doc)
{
List trackingNumbersAndPackageIDs = new List();
string invoice = [login to view URL](outFile);
var trackingNumbers = [login to view URL](doc, "//TrackingNumbers/TrackingNumber");
if ([login to view URL] > 0)
{
[login to view URL]("I found these tracking numbers:", trackingNumbers);
}
else
{
[login to view URL]("The file {0} didn't have any 'TrackingNumber' elements in it!\n", outFile);
}
var merchandiseDescriptions = [login to view URL](doc, "//MerchandiseDescription");
if ([login to view URL] > 0)
{
[login to view URL]("I found these merchandise numbers:", merchandiseDescriptions);
}
else
{
[login to view URL]("The file {0} didn't have any 'MerchandiseDescription' elements in it!\n", outFile);
}
for (int i = 0; i < [login to view URL] && i < [login to view URL]; i++)
{
if (i >= [login to view URL])
{
[login to view URL]("Tracking# is not available for package {0}", i + 1);
}
else
{
var merchandiseDescription = merchandiseDescriptions[i];
string[] values = [login to view URL](' ');
[login to view URL]("Sending to website script.");
var post = [login to view URL]("track={0}&id={1}&invoice={2}",
trackingNumbers[i], 9991, invoice);
for (int j = 0; j < ([login to view URL]() / 2); ++j)
post += [login to view URL]("&quan{2}={0}&sku{2}={1}", values[j + j], values[j + j + 1], j);
[login to view URL](post);
const string url = "[login to view URL]";
//var content = [login to view URL](url, post);
}
}
}
Sir, I have working experience in Entity Frame Work using Code First, Database First Approaches, ASP.NET, MVC 3.0, MVC 4.0, C#, SQL Server 2008, JQUERY, Fluent/UnObtrusive and JQuery Validation. I am good in coding only. No Designing. May I help you ?