The tags in red are not coming from input XML file, sometimes they come and sometimes they wont come. This is a example, not particularly a contact will not come,, some times limit tags may come may not come. How to handle the xml parsing int his situation ????
If XML file is like below;
<ns7:type>Liability</ns7:type>
- <ns7:Coverages>
- <ns7:Coverage>
<ns7:type>Road Coverage</ns7:type>
<ns7:effectiveFromDate>2012-03-21-04:00</ns7:effectiveFromDate>
<ns7:effectiveToDate>2013-03-21-04:00</ns7:effectiveToDate>
<ns7:description>$50,000/100,000</ns7:description>
- <ns7:Limits>
- <ns7:Limit>
<ns8:amount>100000</ns8:amount>
<ns7:limitType>Incident</ns7:limitType>
</ns7:Limit>
- <ns7:Limit>
<ns8:amount>50000</ns8:amount>
<ns7:limitType>Person</ns7:limitType>
</ns7:Limit>
</ns7:Limits>
- <ns7:Premiums>
- <ns9:Premium>
- <ns9:AnnualPremium>
- <ns9:Amount>
<ns8:amount>700.00</ns8:amount>
</ns9:Amount>
</ns9:AnnualPremium>
- <ns9:NetPremium>
- <ns9:Amount>
<ns8:amount>700.00</ns8:amount>
</ns9:Amount>
</ns9:NetPremium>
- <ns9:NetOnBooksPremium>
- <ns9:Amount>
<ns8:amount>700.00</ns8:amount>
</ns9:Amount>
</ns9:NetOnBooksPremium>
</ns9:Premium>
</ns9:QuoteOption>
</ns9:QuoteOptions>
how to handle missing tags xml file ?
Moderators: chulett, rschirm, roy
Yes, they may exists or may not exists; I am getting the fatal errors as below;
xmlSrcReadXmlFile,0: Caught unknown exception from runLocally().
xmlSrcReadXmlFile,0: The runLocally() of the operator failed.
xmlSrcReadXmlFile,0: Operator terminated abnormally: runLocally() did not return APT_StatusOk
xmlSrcReadXmlFile,0: Caught unknown exception from runLocally().
xmlSrcReadXmlFile,0: The runLocally() of the operator failed.
xmlSrcReadXmlFile,0: Operator terminated abnormally: runLocally() did not return APT_StatusOk
there's not enough of a chunk there....the coverages element didn't seem to close....
nevertheless, in this screen shot of xml, there are clearly multiple independent paths ...one for limits perhaps, and another for premiums? I can't tell because it doesn't look like a complete xml and it's only a screen shot from a browser (notice the dashes) and not the actual xml itself.
Handling nulls is something that is done at both the base level for a row and also at the repeating group....and it depends on the repetition element setting.
let's keep reviewing...it's more complicated than what has been outlined so far.
Ernie
nevertheless, in this screen shot of xml, there are clearly multiple independent paths ...one for limits perhaps, and another for premiums? I can't tell because it doesn't look like a complete xml and it's only a screen shot from a browser (notice the dashes) and not the actual xml itself.
Handling nulls is something that is done at both the base level for a row and also at the repeating group....and it depends on the repetition element setting.
let's keep reviewing...it's more complicated than what has been outlined so far.
Ernie
Ernie Ostic
blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>