Transpose XML file into table

Is there a way to transpose the XML data attached into a table with column names?

in the snippet attached everything would repeat the same down to the availability info, and the availability info can repeat itself x times

so if there were 3 "sets" of availability info...
resortID through privacyOccupancy would always be the first 7 columns and would repeat for 3 records with inventoryType through unitCount being different for the three records.

            <resortName>Sheraton Vistana Resort</resortName>
            <kitchenType>Full Kitchen</kitchenType>

Open in new window

Larry Bristersr. DeveloperAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Melih SARICAOwnerCommented:
try this One.. It gives Idea
<?xml version="1.0" encoding="ISO-8859-9"?>
<xsl:stylesheet version="1.0" xmlns:xsl="" >
<xsl:output method = "xml" /> 
<xsl:template match = "/" > 
<xsl:for-each select = "/accommodationItem" >
<table cellspacing="5" cellpadding="2" style="border:1px solid #cccccc;width:250px" >
<tr ><td ><xsl:value-of select ="./resortName" /></td></tr>
<tr style="font-size:11px">
<td   >
	Number of Bedrooms : <xsl:value-of select ="./nbrOfBedrooms" />
	Number of BathRooms: <xsl:value-of select ="./nbrOfBathrooms" />
	Kitchen Type: <xsl:value-of select ="./kitchenType" />
<xsl:for-each select = "./availabilityInfo" >
<tr style="font-size:11px">
<td >
        CheckIn : <xsl:value-of select ="./checkInDate" />
	CheckOut: <xsl:value-of select ="./checkOutDate" />
	Cost: <xsl:value-of select ="./unitCost/value" /><xsl:value-of select ="./unitCost/currency" />

Open in new window

Larry Bristersr. DeveloperAuthor Commented:

Is there a way to place that in a dataset?
Larry Bristersr. DeveloperAuthor Commented:
And how do I use it?
Melih SARICAOwnerCommented:
What i send is for transform.. U  can use it with xmltransform...

Using it as dataset is something as different..
create a new dataset and use readXML function to read into dataset .. there are some parameters about schema try different values for desired result..


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Languages and Standards

From novice to tech pro — start learning today.