[xsl] How to generate XSLT for a Dynamic XML file?

Subject: [xsl] How to generate XSLT for a Dynamic XML file?
From: "Paria Heidari" <pheidari@xxxxxxxxxxxxxx>
Date: Thu, 23 Sep 2004 15:38:40 -0400
Hello,

I have dynamic xml file that gets generated at the runtime. I need to
create xslt file that will transform this file to a tabular format with
the nodes as the table header and the values as the table data. I know
the Root node, and the program passes in the main node name.

Also, the level of nodes is unknown.

Is there anyway I can accomplish what I want in xslt?


Sample xml file --------------
<CUSTOMERS>
	<CUSTOMER>
		<CUST_ID>2</CUST_ID>
		<FIRST_NAME>test</FIRST_NAME>
		<LAST_NAME>test2</LAST_NAME>
		<CUST_ACCUCAST_DATA>
			<CAD_CUST_ID>2</CAD_CUST_ID>
			<MSG_CONTENT>T</MSG_CONTENT>
			<BAD_EMAIL> </BAD_EMAIL>
			<USER_AGENT>Mozilla/4.0 (compatible; MSIE 6.0;
Windows NT 5.0)</USER_AGENT>
			<EMAIL_AGENT> </EMAIL_AGENT>
		</CUST_ACCUCAST_DATA>
		<DEPARTMENT>
			<D_ID>2</D_ID>
			<D_NAME>Sales</D_NAME>
		</DEPARTMENT>
		<ORDERSS>
			<ORDERS>
				<O_ID>2</O_ID>
			</ORDERS>
		</ORDERSS>
	</CUSTOMER>
</CUSTOMERS>


The only value I know from the above is root name 'CUSTOMERS', but the
first node, 'CUSTOMER', gets passed into me as a param value.


I'll appreciate any help,
Paria

Current Thread