请教一个用DOM根改处理指令的问题

ruirui521 2002-06-24 04:12:54
<?xml version="1.0" encoding="GB2312"?>
<?xml-stylesheet type="text/xsl" href="StyleList/amSystem01.xsl"?>
<amSystem>
……
</amSystem>
我想load了这个xml后,用DOM更改处理指令为:<?xml-stylesheet type="text/xsl" href="StyleList/amSystem02.xsl"?>
请问应该怎么写?
...全文
25 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
ruirui521 2002-06-24
  • 打赏
  • 举报
回复
虽然没有更改以前的,但是我用这个方法还是解决了问题。多谢了
sunbeamy 2002-06-24
  • 打赏
  • 举报
回复
pi = xmlDoc.createProcessingInstruction("xml-stylesheet", "type=\"text/xsl\" href=\"StyleList/amSystem02.xsl\"");
xmlDoc.insertBefore(pi, xmlDoc.childNodes.item(0));
sunbeamy 2002-06-24
  • 打赏
  • 举报
回复
pi = xmlDoc.createProcessingInstruction("xml-stylesheet", "type=\"text/xsl\" href=\"StyleList/amSystem02.xsl\"");
xmlDoc.insertBefore(pi, xmlDoc.childNodes.item(0));

8,906

社区成员

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

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