G
George Durzi
Check out this Xml
<NewDataSet>
<Table>
<GB_JOB_ID>8060</GB_JOB_ID>
<SALES_CODE>160</SALES_CODE>
<JOB_NUMBER>040435</JOB_NUMBER>
<JOB_NUMBER_FORMATTED>160-040435</JOB_NUMBER_FORMATTED>
<PRIMARY_COMPANY>Some Company</PRIMARY_COMPANY>
<STUDY_NAME>Name of Study</STUDY_NAME>
<ACCOUNT_MANAGER>Jane Doe</ACCOUNT_MANAGER>
</Table>
<Table1>
<CurrentWave>True</CurrentWave>
<Response>System.Data.DataSet</Response>
</Table1>
<Table1>
<CurrentWave>False</CurrentWave>
<Response>System.Data.DataSet</Response>
</Table1>
</NewDataSet>
The "Response" DataColumnof Table1 contains a small DataSet.
The above Xml was generated by doing a myDataSet.WriteXml(some file path).
I've verified that the DataSet is properly in the "Response" DataColumn; I
can iterate through it's contents in code and write them to the screen.
I'd like to perform an Xsl transformation on this Xml ... Obviously, doing a
<xsl:value-of select="Response" /> will simply give me "System.Data.DataSet"
How do I get at the DataSet that's sitting inside the "Response"
DataColumn??
For reference, here's a snippet of that that DataSet looks like, I've taken
out most of it just to keep it simple for this example
<DataConsistency>
<Company>
<CompanyId>0</CompanyId>
<CompanyName>Spike TV</CompanyName>
</Company>
<Company>
<CompanyId>1</CompanyId>
<CompanyName>Cartoon Network</CompanyName>
</Company>
<Company>
<CompanyId>2</CompanyId>
<CompanyName>Comedy Central</CompanyName>
</Company>
<Company>
<CompanyId>3</CompanyId>
<CompanyName>Discovery Channel</CompanyName>
</Company>
</DataConsistency>
I tried the following:
<xsl:for-each
select="NewDataSet/Table1/Response/DataConsistency/Company">
<td><xsl:value-of select="CompanyId" /></td>
</xsl:for-each>
I'm pretty sure that "NewDataSet/Table1/Response/DataConsistency/Company"
isn't the proper syntax ... Any tips would really help.
Thanks
<NewDataSet>
<Table>
<GB_JOB_ID>8060</GB_JOB_ID>
<SALES_CODE>160</SALES_CODE>
<JOB_NUMBER>040435</JOB_NUMBER>
<JOB_NUMBER_FORMATTED>160-040435</JOB_NUMBER_FORMATTED>
<PRIMARY_COMPANY>Some Company</PRIMARY_COMPANY>
<STUDY_NAME>Name of Study</STUDY_NAME>
<ACCOUNT_MANAGER>Jane Doe</ACCOUNT_MANAGER>
</Table>
<Table1>
<CurrentWave>True</CurrentWave>
<Response>System.Data.DataSet</Response>
</Table1>
<Table1>
<CurrentWave>False</CurrentWave>
<Response>System.Data.DataSet</Response>
</Table1>
</NewDataSet>
The "Response" DataColumnof Table1 contains a small DataSet.
The above Xml was generated by doing a myDataSet.WriteXml(some file path).
I've verified that the DataSet is properly in the "Response" DataColumn; I
can iterate through it's contents in code and write them to the screen.
I'd like to perform an Xsl transformation on this Xml ... Obviously, doing a
<xsl:value-of select="Response" /> will simply give me "System.Data.DataSet"
How do I get at the DataSet that's sitting inside the "Response"
DataColumn??
For reference, here's a snippet of that that DataSet looks like, I've taken
out most of it just to keep it simple for this example
<DataConsistency>
<Company>
<CompanyId>0</CompanyId>
<CompanyName>Spike TV</CompanyName>
</Company>
<Company>
<CompanyId>1</CompanyId>
<CompanyName>Cartoon Network</CompanyName>
</Company>
<Company>
<CompanyId>2</CompanyId>
<CompanyName>Comedy Central</CompanyName>
</Company>
<Company>
<CompanyId>3</CompanyId>
<CompanyName>Discovery Channel</CompanyName>
</Company>
</DataConsistency>
I tried the following:
<xsl:for-each
select="NewDataSet/Table1/Response/DataConsistency/Company">
<td><xsl:value-of select="CompanyId" /></td>
</xsl:for-each>
I'm pretty sure that "NewDataSet/Table1/Response/DataConsistency/Company"
isn't the proper syntax ... Any tips would really help.
Thanks