Just how we are able to pull out the column names from our table with this code:
select column_name from information_schema.columns
where table_name = 'theNameofMyTable'
order by ordinal_position
Is there a similar function to pull out the names of a XML file's column names?
<Item>
<Product>Food</Product>
<Date>09/03/11</Date>
<Shipped>10/01/11</Date>
</Item>
I am wanting to write a code in sql that will pull out the column names in my xml files. I need to compare their schemas.
For this XML file, I'd want to see the column nodes: Product, Date, Shipped