xml schema的使用

lansing2003 2004-08-19 09:12:06
在.net中用sql语句从数据库中取得的数据怎样才能通过.xsd文件转换为规定格式的xml文件呢?
如取出的数据直接用getxml()方法得到的结果是:
<item>
<bookid>1</bookid>

<bookname>.net高级编程</bookname>

<authorid>1</authorid>

<authorname>John</authorname>

<authorid>2</authorid>

<authorname>Ted</authorname>
</item>

希望使用.xsd得到下面的结果
<item>
<book id=1 name=.net高级编程></bookid>

<author id=1 name=John></authorid>

<author id=2 name=Ted></authorid>
</item>

谢谢!
...全文
140 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
dsclub 2004-08-19
  • 打赏
  • 举报
回复
Schema能完成这个任务么?


XSLT可以!

8,906

社区成员

发帖
与我相关
我的任务
社区描述
XML/XSL相关问题讨论专区
社区管理员
  • XML/XSL社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧