新书推介:《语义网技术体系》
作者:瞿裕忠,胡伟,程龚
   XML论坛     W3CHINA.ORG讨论区     计算机科学论坛     SOAChina论坛     Blog     开放翻译计划     新浪微博  
 
  • 首页
  • 登录
  • 注册
  • 软件下载
  • 资料下载
  • 核心成员
  • 帮助
  •   Add to Google

    >> 本版讨论SVG, GML, X3D, VRML, VML, XAML, AVALON, Batik等基于XML的图形技术,以及有关GIS的应用。
    [返回] 中文XML论坛 - 专业的XML技术讨论区XML.ORG.CN讨论区 - 高级XML应用『 SVG/GML/VRML/X3D/XAML 』 → [求助]用MSXML解析SVG的两个问题 查看新帖用户列表

      发表一个新主题  发表一个新投票  回复主题  (订阅本版) 您是本帖的第 4130 个阅读者浏览上一篇主题  刷新本主题   树形显示贴子 浏览下一篇主题
     * 贴子主题: [求助]用MSXML解析SVG的两个问题 举报  打印  推荐  IE收藏夹 
       本主题类别:     
     unicornwhy 帅哥哟,离线,有人找我吗?
      
      
      等级:大一新生
      文章:3
      积分:66
      门派:XML.ORG.CN
      注册:2006/11/23

    姓名:(无权查看)
    城市:(无权查看)
    院校:(无权查看)
    给unicornwhy发送一个短消息 把unicornwhy加入好友 查看unicornwhy的个人资料 搜索unicornwhy在『 SVG/GML/VRML/X3D/XAML 』的所有贴子 引用回复这个贴子 回复这个贴子 查看unicornwhy的博客楼主
    发贴心情 [求助]用MSXML解析SVG的两个问题

    我用的是MSXML4.0,对SVG没什么了解,公司项目需要,没想到一动手就遇到问题

    1.有Link的文件不能加载,就是load(filename)的时候就出错
        我在SVG文件里加了下面一句
    <a xlink:href="http://www.w3.org//Graphics//SVG//Overview.htm8">
       就解析不了了,删除后正常解析

    2.doctype解析不正常
       只要SVG文件里有doctype语句,就会解析完这句后退出
    比如我的SVG文件如下:
    <?xml version="1.0" standalone="no" ?>
    <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN"
    "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">

    <svg width="300" height="100" xmlns="http://www.w3.org/2000/svg">

    <rect x="25" y="10" width="280" height="50"
    fill="red" stroke="blue" stroke-width="3"/>

    </svg>

    则解析的结果
    the NO.0 Attributes version of xml is  = 1.0
    the NO.1 Attributes standalone of xml is  = no
    the NO.0 Attributes PUBLIC of svg is  = -//W3C//DTD SVG 1.0//EN
    the NO.1 Attributes SYSTEM of svg is  = http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd

    删除doctype语句后解析结果为:
    the NO.0 Attributes version of xml is  = 1.0
    the NO.1 Attributes standalone of xml is  = no
    the NO.0 Attributes width of svg is  = 300
    the NO.1 Attributes height of svg is  = 100
    the NO.2 Attributes xmlns of svg is  = http://www.w3.org/2000/svg
    the NO.0 Attributes x of rect is  = 25
    the NO.1 Attributes y of rect is  = 10
    the NO.2 Attributes width of rect is  = 280
    the NO.3 Attributes height of rect is  = 50
    the NO.4 Attributes fill of rect is  = red
    the NO.5 Attributes stroke of rect is  = blue
    the NO.6 Attributes stroke-width of rect is  = 3


       收藏   分享  
    顶(0)
      




    点击查看用户来源及管理<br>发贴IP:*.*.*.* 2007/1/26 17:33:00
     
     GoogleAdSense
      
      
      等级:大一新生
      文章:1
      积分:50
      门派:无门无派
      院校:未填写
      注册:2007-01-01
    给Google AdSense发送一个短消息 把Google AdSense加入好友 查看Google AdSense的个人资料 搜索Google AdSense在『 SVG/GML/VRML/X3D/XAML 』的所有贴子 访问Google AdSense的主页 引用回复这个贴子 回复这个贴子 查看Google AdSense的博客广告
    2024/5/19 19:03:57

    本主题贴数1,分页: [1]

    管理选项修改tag | 锁定 | 解锁 | 提升 | 删除 | 移动 | 固顶 | 总固顶 | 奖励 | 惩罚 | 发布公告
    W3C Contributing Supporter! W 3 C h i n a ( since 2003 ) 旗 下 站 点
    苏ICP备05006046号《全国人大常委会关于维护互联网安全的决定》《计算机信息网络国际联网安全保护管理办法》
    54.688ms