Avatar of vcharles
vcharles
 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
Visual Basic.NET.NET Programming

Avatar of undefined
Last Comment
vcharles

8/22/2022 - Mon
Ioannis Paraskevopoulos

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
Fernando Soto

Victor, can there be more then 1 Row1, Row2, Row3, ..., in the original XML document?
ASKER CERTIFIED SOLUTION
Fernando Soto

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
vcharles

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
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy
Fernando Soto

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.
vcharles

ASKER
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
Fernando Soto

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.
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
vcharles

ASKER
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
vcharles

ASKER
Thank You!