[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] extracting element-names
I am having problems to extract element-names from XML documents with XSL stylesheets: Assuming, I have the following XML fragment: --------------- <Person> <Name>Ben</Name> <Age>5</Age> <Country>Ireland</Country> </Person> --------------- Next: I want to create the following 'table': --------------- Name: Ben Age: 5 Country: Ireland --------------- This XSL stylesheet does the job, BUT only if I know the element-names! If the XML source document changes (e.g. another child <City>Galway</City> is included), I would have to change the XSL, too. --------------- <xsl:for-each select="Person"> Name: <xsl:value-of select="Name"/> Age: <xsl:value-of select="Age"/> Country: <xsl:value-of select="Country"/> </xsl:for-each> ----------------- Any ideas? Ben XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|