XML Export: Create an XML export of two rows of data from one of your completed
ID: 3797875 • Letter: X
Question
XML Export: Create an XML export of two rows of data from one of your completed tables that has at least 4 columns.
Drug Name
Manufacturer
Manufacturer Contact
Limited Distribution Drug
Can U of M Stock Drug?
Specialty Pharmacies
Inlyta
Pfizer
Kate Fellner
Yes
Yes
Accredo, Walgreens, CVS Caremark
Zytiga
Astellas
Ryan Sargent
Yes
Yes
Avella, Accredo, Walgreens, Biologics.
The XML report needs to be created using the table I have listed above.
Thanks
Drug Name
Manufacturer
Manufacturer Contact
Limited Distribution Drug
Can U of M Stock Drug?
Specialty Pharmacies
Inlyta
Pfizer
Kate Fellner
Yes
Yes
Accredo, Walgreens, CVS Caremark
Zytiga
Astellas
Ryan Sargent
Yes
Yes
Avella, Accredo, Walgreens, Biologics.
Explanation / Answer
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0">
<xsl:template match="/">
<html>
<body>
<table border="1">
<tr>
<th>Drug Name</th>
<th>Manufacturer</th>
<th>Manufacturer Contact</th>
<th>Limited Distribution Drug</th>
<th>Can U of M Stock Drug?</th>
</tr>
<xsl:for-each select="catalog/cd">
<tr>
<td><xsl:value-of >Inlyta</td>
<td><xsl:value-of >Pfizer</td>
<td><xsl:value-of >Kate Fellner</td>
<td><xsl:value-of >Yes</td>
<td><xsl:value-of >Yes</td>
</tr>
<tr>
<td><xsl:value-of >Zytiga</td>
<td><xsl:value-of >Astellas</td>
<td><xsl:value-of >Ryan Sargent</td>
<td><xsl:value-of >Yes</td>
<td><xsl:value-of >Yes</td>
</tr>
</xsl:for-each>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.