Click here to Skip to main content
15,889,992 members
Home / Discussions / XML / XSL
   

XML / XSL

 
QuestionConvert MS Excel file to XML file Pin
sonigirish28-Oct-07 18:56
sonigirish28-Oct-07 18:56 
AnswerRe: Convert MS Excel file to XML file Pin
Paul Conrad4-Nov-07 7:58
professionalPaul Conrad4-Nov-07 7:58 
Questiongetting element [modified] Pin
RussBus25-Oct-07 12:30
RussBus25-Oct-07 12:30 
AnswerRe: getting element Pin
George L. Jackson25-Oct-07 13:15
George L. Jackson25-Oct-07 13:15 
GeneralRe: getting element Pin
RussBus26-Oct-07 4:32
RussBus26-Oct-07 4:32 
AnswerRe: getting element Pin
pmarfleet26-Oct-07 7:48
pmarfleet26-Oct-07 7:48 
GeneralRe: getting element Pin
RussBus26-Oct-07 7:54
RussBus26-Oct-07 7:54 
AnswerRe: getting element Pin
George L. Jackson26-Oct-07 9:30
George L. Jackson26-Oct-07 9:30 
Your context node is attribute; thus, you're printing its name. You want to print out the children elements name. It you just want to print out the first child's name:

<xsl:value-of select="child::*[position()=1]"/>

Given this XML document:

<?xml version='1.0'?>
<report>
<attribute>
<ColumnID>TestColumID</ColumnID>
<TableName>Assignment</TableName>
<ColumnName>Delta</ColumnName>
<DataType>System.Double</DataType>
<ColumnUsage>OutputColumn</ColumnUsage>
<ValueType>Single</ValueType>
<DisplayTitle>Adherence Delta</DisplayTitle>
<TypeId>ReportDatabaseColumnAttribute</TypeId>
</attribute>
</report>

here is an example of what you are trying to do except it prints out all children names:

<?xml version='1.0'?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<html>
<body>
<table>
<xsl:for-each select="report/attribute">
<tr>
<xsl:for-each select="child::*">
<td><xsl:value-of select="name()"/></td>
<td><xsl:value-of select="."/></td>
</xsl:for-each>
</tr>
</xsl:for-each>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>

"We make a living by what we get, we make a life by what we give." --Winston Churchill

Questionxml with crystal reports Pin
sreenivasaraok25-Oct-07 2:09
sreenivasaraok25-Oct-07 2:09 
Questionxml values to database Pin
KarthikMano24-Oct-07 19:40
KarthikMano24-Oct-07 19:40 
QuestionHow to extract specific data values from xml using VC++ [modified] Pin
zxc8924-Oct-07 1:31
zxc8924-Oct-07 1:31 
AnswerRe: How to extract specific data values from xml using VC++ Pin
Stefan Troschuetz24-Oct-07 2:30
Stefan Troschuetz24-Oct-07 2:30 
AnswerRe: How to extract specific data values from xml using VC++ Pin
Nathan Holt at EMOM24-Oct-07 6:35
Nathan Holt at EMOM24-Oct-07 6:35 
GeneralProblem with SelectNodes [modified] Pin
Brady Kelly23-Oct-07 5:08
Brady Kelly23-Oct-07 5:08 
GeneralRe: Problem with SelectNodes Pin
pmarfleet23-Oct-07 5:34
pmarfleet23-Oct-07 5:34 
GeneralRe: Problem with SelectNodes Pin
Brady Kelly23-Oct-07 5:37
Brady Kelly23-Oct-07 5:37 
News[ANN] Liquid XML Studio Released - A Freeware XML Development Environment Pin
Liquid Technologies22-Oct-07 22:33
Liquid Technologies22-Oct-07 22:33 
GeneralRe: [ANN] Liquid XML Studio Released - A Freeware XML Development Environment Pin
Scott Dorman23-Oct-07 3:23
professionalScott Dorman23-Oct-07 3:23 
QuestionClass for deserializing array Pin
Howard Richards22-Oct-07 4:54
Howard Richards22-Oct-07 4:54 
AnswerRe: Class for deserializing array Pin
George L. Jackson22-Oct-07 8:27
George L. Jackson22-Oct-07 8:27 
GeneralRe: Class for deserializing array Pin
Howard Richards22-Oct-07 9:02
Howard Richards22-Oct-07 9:02 
QuestionProblem in linking the xsl file to xml file (when I use FireFox) Pin
Rocky#19-Oct-07 0:16
Rocky#19-Oct-07 0:16 
AnswerRe: Problem in linking the xsl file to xml file (when I use FireFox) Pin
George L. Jackson19-Oct-07 4:31
George L. Jackson19-Oct-07 4:31 
GeneralRe: Problem in linking the xsl file to xml file (when I use FireFox) Pin
Rocky#21-Oct-07 19:55
Rocky#21-Oct-07 19:55 
GeneralRe: Problem in linking the xsl file to xml file (when I use FireFox) Pin
George L. Jackson22-Oct-07 0:55
George L. Jackson22-Oct-07 0:55 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.