Avatar of Victor  Charles
Victor Charles
Flag for United States of America asked on

Help with creating xml fles from one xml files

Hi,

How do you create multiple xml files based on a data element?  For example if I have the following xml file:

Final.xml
  <Root>
	  <Table_NSC>
		  <ID> 1</ID>
			<CTRY>BEL</CTRY>
		  <NSC></NSC>
	  </Table_NSC>
	  <Table_NSC>
		  <ID> 2</ID>
			<CTRY>CAN</CTRY>
		  <NSC></NSC>
	  </Table_NSC>
	  <Table_NSC>
		  <ID> 3</ID>
			<CTRY>CAN</CTRY>
		  <NSC></NSC>
	  </Table_NSC>
	  <Table_NSC>
		  <ID> 4</ID>
			<CTRY>DEU</CTRY>
		  <NSC></NSC>
	  </Table_NSC>
  </Root>

Open in new window

How do I create the following xml files?
  <Root>
	  <Table_NSC>
		  <ID> 1</ID>
			<CTRY>BEL</CTRY>
		  <NSC></NSC>
	  </Table_NSC>
</Root>  

Open in new window

CAN.xml
<Root>
	<Table_NSC>
		<ID> 2</ID>
			<CTRY>CAN</CTRY>
		<NSC></NSC>
	</Table_NSC>
	<Table_NSC>
		<ID> 3</ID>
			<CTRY>CAN</CTRY>
		<NSC></NSC>
	</Table_NSC>
</Root>

Open in new window

DEU.xml
<Root>
	<Table_NSC>
		<ID> 4</ID>
			<CTRY>DEU</CTRY>
		<NSC></NSC>
	</Table_NSC>
</Root>  

Open in new window


Thanks,

Victor
.NET ProgrammingVisual Basic.NETXML

Avatar of undefined
Last Comment
Victor Charles

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Robert Schutt

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
aikimark

also, there is probably an XSL transformation for this
Victor Charles

ASKER
Thank You.
Your help has saved me hundreds of hours of internet surfing.
fblack61