Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
vchuprina
Specialist
Specialist

XML files with different structure

Hi Guys,

I'm working on QV applicaton that should read data from XML files. We have around two thousand files and ofcourse I want load them by loop, but many of them have different structure. I opened just 7 files, they have only thee- four file similar columns, but I need to read all columns, because other columns contains customer customizations, which we want to analyze. Unfortunately * symbol doesn't work with xml.

Do you know a way to do this?

Thanks,

Vitalii

Press LIKE if the given solution helps to solve the problem.
If it's possible please mark correct answers as "solutions" (you can mark up to 3 "solutions").
3 Replies
zhadrakas
Specialist II
Specialist II

you have to load a table before which contains all fields you want to load.

Then concatenate all Tables and read the missing field as null values

Master:
LOAD * INline [F1,F2,F3,F4];

Load F1,

         F2,

         null() as F3,

         null() as F4

From XML1;

...

Regards

Tim

vchuprina
Specialist
Specialist
Author

Hi Tim,

Thank you for your answer, I also thought about such solution, but I have around 2000 files and it will be a little bit complicated to open each and check columns which it have.

Thanks, Vitalii

Press LIKE if the given solution helps to solve the problem.
If it's possible please mark correct answers as "solutions" (you can mark up to 3 "solutions").
zhadrakas
Specialist II
Specialist II

Hi Vitalii,

Sound like a lot of work.

In this case i think the easiest way is :

1) identify XML's which has the same Format and safe them into a QVD

2) concatenate like said in thread above