【发布时间】:2011-05-09 01:43:43
【问题描述】:
如何使用 XSLT 样式表。结果将是具有以下结构的 XML 文件 (item.xml) 其中 ocshelf="yes" 和 type="cosmetic"
products.xml------------------------------------
<products>
<product onshelf=“yes” condition=“ok”>
<type>cosmetic</type>
<price>680</price>
<address>
<streetNo>1</streetNo>
<street>Jefer Street</street>
<suburb>Melbourne</suburb>
</address>
</product>
<product onshelf=“yes” condition=“ok”>
<type>noncosmetic</type>
<price>600</price>
<address>
<streetNo>2</streetNo>
<street>Colo Street</street>
<suburb>Melbourne</suburb>
</address>
</product>
</products>
item.xml--------------------------------
<products>
<product condition=“ok”>
<type>cosmetic</type>
<price>680</price>
<address>1 Jefer Street , Melbourne </address>
</product>
</products>
【问题讨论】:
-
到目前为止你有什么,它怎么不工作?
-
@ignacio 实际上我不知道如何使用 xslt n php 将 products.xml 转换为 item.xml
-
这里的回答者基本上免费提供他们的服务,如果没有为解决问题付出任何努力,甚至没有阅读教程的程度,大多数人都不愿意提供帮助。
-
您是否在编写 XSLT 代码或从 PHP 运行它时遇到问题?或两者?为了帮助您,我们需要知道您遇到的问题。