您的位置:程序门 -> vb -> 基础类



急急急急!在vb6.0中怎样用msxml的方法来判断一个xml文件是否符合xml schema的格式?


[收藏此页] [打印本页]选择字色:背景色:字体:[][][]


急急急急!在vb6.0中怎样用msxml的方法来判断一个xml文件是否符合xml schema的格式?
发表于:2007-08-20 14:14:20 楼主
怎样用msxml的方法来判断一个xml文件是否符合xml   schema的格式?是vb6.0的!!!
发表于:2007-08-20 16:12:501楼 得分:0
mark
发表于:2007-08-20 18:01:382楼 得分:0
呀哈,姐妹俩?
发表于:2007-09-06 11:38:173楼 得分:0
怎么没人回答问题啊!5555555555
发表于:2007-09-10 11:07:064楼 得分:0
就看运行的时候报错不报错咯   哈哈
发表于:2007-10-12 13:51:295楼 得分:0
public   sub   loaddocument(sfile   as   string)
     
        dim   xdoc   as   msxml2.domdocument
        set   xdoc   =   new   msxml2.domdocument
        xdoc.validateonparse   =   false     '这行用true也试试
         
        if   xdoc.load(sfile)   then          
                '   the   document   loaded   successfully.
                '   now   do   something   intersting.          
        else
       
                dim   strerrtext   as   string
                dim   xpe   as   msxml2.ixmldomparseerror
                 
                '   ?得parseerror?象
                set   xpe   =   xdoc.parseerror
                 
                with   xpe
                 
                        strerrtext   =   "   xml   document   不能load   "   &   _
                        "原因是."   &   vbcrlf   &   _
                        "error:   "   &   .errorcode   &   ":   "   &   xpe.reason   &   vbcrlf   &   _
                        "line   #:   "   &   .line   &   vbcrlf   &   _
                        "line   position:   "   &   .linepos   &   vbcrlf   &   _
                        "position   in   file:   "   &   .filepos   &   vbcrlf   &   _
                        "source   text:   "   &   .srctext   &   vbcrlf   &   _
                        "document   url:   "   &   .url
                 
                end   with
                                     
                msgbox   strerrtext,   vbexclamation
                set   xpe   =   nothing
               
        end   if
     
end   sub


快速检索

最新资讯
热门点击