var doc = new XDocument(
new XElement(p + "Form109495CTransmittalUpstream",
new XAttribute(XNamespace.Xmlns + "p", p),
new XAttribute(XNamespace.Xmlns + "p1", p1),
new XAttribute(XNamespace.Xmlns + "p2", p2),
new XAttribute(XNamespace.Xmlns + "p3", p3),
new XAttribute(XNamespace.Xmlns + "xsi", xsi),
new XAttribute(xsi + "schemaLocation", schemaLocation),
new XElement(p1 + "Form1094CUpstreamDetail",
new XAttribute("recordType", ""),
new XAttribute("lineNum", "0"),
new XElement(p1 + "SubmissionId", submissionId),
new XElement(p1 + "TestScenarioId", (testScenarioId != "") ? (testScenarioId + "-0") : ""),
new XElement(p1 + "TaxYr", taxYear),
new XElement(p1 + "CorrectedInd", 0),
OrganizationToXml(employer.Company, "EmployerInformationGrp"),
OrganizationToXml(employer.GovEntity, "GovtEntityEmployerInfoGrp"),
new XElement(p1 + "Form1095CAttachedCnt", (employer.TotalForms > 0) ? employer.TotalForms.ToString() : ""),
new XElement(p1 + "AuthoritativeTransmittalInd", (employer.AuthoritativeTransmission == true) ? "1" : ""),
new XElement(p1 + "TotalForm1095CALEMemberCnt", (employer.TotalForms > 0) ? employer.TotalForms.ToString() : ""),
new XElement(p1 + "AggregatedGroupMemberCd", ((employer.AggregatedAleGroup == null) ? "0" : (employer.AggregatedAleGroup == true) ? "1" : "2")),
new XElement(p1 + "QualifyingOfferMethodInd", ((employer.CertificationA == true) ? "1" : "")),
new XElement(p1 + "QlfyOfferMethodTrnstReliefInd", ((employer.CertificationB == true) ? "1" : "")),
new XElement(p1 + "Section4980HReliefInd", ((employer.CertificationC == true) ? "1" : "")),
new XElement(p1 + "NinetyEightPctOfferMethodInd", ((employer.CertificationD == true) ? "1" : "")),
AleMemberInfoToXml(employer),
employer.OtherAleMembers.Select(x => SubsidiaryToXml(x)),
employees.Select((value, index) => EmployeeToXml(value, index + 1, employer.Company.Phone, taxYear, testScenarioId.ToString()))
)
)
);
I am attempting to validate my MANIFEST xml file and 1094-C fileFile against this years schema. I have gotten it down just to two last errors , which i believe if the first error is fixed the second one will be taken care off. Included is everything that I know I can legally show at the moment. The picture is the error itself. I am wondering if has to do with the fact that the Section4980h area seems to be commented out in the schema. The code snippet posted is the problem area. The error i am getting