Hi every one, I'm in trouble with xml could you help me please?
I have a xml file and I try to get datas from that xml file.
In that files have some times one object some times many object
<Sales_Invoices> <Invoice> <Curr_Acc_Code ..... /> . . . </Invoice> </Sales_Invoices>
some times this xml could be like that
<Sales_Invoices> <Invoice> <Curr_Acc_Code ..... /> . . . </Invoice> <Invoice> <Curr_Acc_Code ..... /> . . . </Invoice> </Sales_Invoices>
if that xml file have many Invoice my for each can work very good.But if that xml file have just one Invoice for each gives error because if xml have many Invoice ObjectXDTO.Invoice return XDTOList type but If xml have a Ivoice ObjectXDTO return XDTOObject. I try to fix with TypeOf but I couldn't. How can I fix this situation.
Could you help me please?
edit: TypeOf Function doesn't useful. İf I check Shift+F9 return Type is XDTOList or XDTOObject but If I check TypeOf method return type always XDTOObject.