students.xml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | <?xml version="1.0" encoding="utf-8"?> <?xml-stylesheet type="text/xsl" href="students.xsl"?> <students> <student> <name>Jieun Park</name> <student_id>201406253</student_id> </student> <student> <name>John Doe</name> <student_id>201304238</student_id> </student> <student> <name>Jane Doe</name> <student_id>201304238</student_id> </student> </students> | cs |
students.xsl
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | <?xml version="1.0" encoding="utf-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="html" doctype-system="about:legacy-compat"/> <xsl:template match="/"> <html> <head> <meta charset="utf-8"/> <title>Students</title> <style type="text/css"> td { color: blue; } </style> </head> <body> <table> <caption>Information about various students</caption> <thead> <tr> <th>이름</th> <th>학번</th> </tr> </thead> <xsl:for-each select="/students/student"> <tr> <td><xsl:value-of select="name"/></td> <!-- Attribute는 @을 앞에 붙이세요.--> <td><xsl:value-of select="student_id"/></td> </tr> </xsl:for-each> </table> </body> </html> </xsl:template> </xsl:stylesheet> | cs |
'프로그래밍 > General' 카테고리의 다른 글
타임존(Timezone) 코드 한글 번역 자료 JSON 파일 (1) | 2018.10.05 |
---|---|
PHP 검색 조회 등록 프로그램. (0) | 2017.12.20 |
PHP MYSQL과 통신 쉽게하기 (0) | 2017.12.12 |
구글 검색결과 상단에 내 페이지가 나오는 비결 (1) | 2017.04.15 |
[Node.js] PM2에서 NODE_ENV 설정하여 실행하기 (0) | 2017.04.01 |