<?xml version="1.0" encoding="UTF-8"?>
<EfxTransmit
xmlns="http://www.....abc"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www....def http://www....ghi">
<EfxReport requestNumber="1" reportId="CNCONSUMERCREDITFILE">
<CNConsumerCreditReports>
....I only care about these
....I only care about these
....I only care about these
</CNConsumerCreditReports>
</EfxReport>
</EfxTransmit>
I created an object schema that resemble this:
[XmlRoot("CNConsumerCreditReports")]
public class Data
{
[XmlElement("CNConsumerCreditReport")]
public CNConsumerCreditReports CNConsumerCreditReports { get; set; }
}
But in order for that schema to work, I have to manually delete the following stuffs from the XML string as well as its ending closing tags
<EfxTransmit
xmlns="http://www.....abc"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www....def http://www....ghi">
<EfxReport requestNumber="1" reportId="CNCONSUMERCREDITFILE">
But, I found that manually deleting those tags is troublesome and I am hoping to find a way to work around. I just don't know what or how. But I am sure there is a better way.
Any suggestion or snipped code is appreciated!
Thank you.