Link to home
Start Free TrialLog in
Avatar of Victor  Charles
Victor CharlesFlag for United States of America

asked on

Help with creating xml files from tables in an xml file

Hi,

I have an xml files with multiple tables (i.e. Row1, Row2, Row3 etc..)

How do I create an multiple xml files for data Row1.xml, Row2.xml, Row3.xml?

Thanks,

Victor
Avatar of Ioannis Paraskevopoulos
Ioannis Paraskevopoulos
Flag of Greece image

The answer to this question highly depends on the format of the initial xml file.

You would better add here a sample initial xml and possibly if you like a requested output so we can provide a better answer.

Giannis
Victor, can there be more then 1 Row1, Row2, Row3, ..., in the original XML document?
ASKER CERTIFIED SOLUTION
Avatar of Fernando Soto
Fernando Soto
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Victor  Charles

ASKER

Hi,

There are multiple records for each table, the tables in my actual project are not named Row(x), x = 1,2,3, just using Row as an example. I will try the code and get back toy you.

Thank you.

Victor
To your statement, "my actual project are not named Row(x), x = 1,2,3, just using Row as an example", I understand X was meant to represent any character at the end.
Hi,

It works! Is there a way rename the xml file depending on the table? for example if table is Row1 name the xml file LinkFileCTRY, if Row2 name the xml LinkFileItemA?

Thank You.

Victor
There is no way to infer that from the name Row1 or whatever the table name is to some other name. You would need to have some type of mapping function that would take in the name Row1 and return LinkFileCTRY as the file name to be used.
I think a way around would be the rename the file, for example if my file name is Row1.ml, I will rename it LinkRow1BEL.xml for BEL data.

Thanks,

Victor
Thank You!