CSDN博客

img stationxp

XML文件源码察看器(七)

发表于2003/8/11 11:02:00  765人阅读

分类: xml

'给指令节点着色


function renderInstruction(nodNode,intLevel)


    dim strNodes,intCount,intNode


    strNodes = ""


    intCount = 0


    intNode = 0


    dim nodAttrList


    strNodes=strNodes & getIndent(intLevel)&"<font color=""green"">&lt"




    strNodes=strNodes & "?"


    strNodes=strNodes & nodNode.nodeName&" "


    ' check there are some attributes


    strNodes=strNodes & nodNode.nodeValue


    strNodes=strNodes & "?&gt</font><br>"


    renderInstruction = strNodes


end function




function getIndent(intLevel)


  ' create a string of spaces


  dim strIndent


  strIndent = ""


  for intIndent = 0 to intLevel-1


    strIndent = strIndent & "&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp"


  next


  getIndent = strIndent


end function
%>
<HTML>

<HEAD>

    <TITLE>XML 源码察看器 </TITLE>

</HEAD>

<BODY BGCOLOR="#FFFFFF" style="font-family:Tahoma,Arial,sans-serif ;font-size:10pt;">

<SPAN style="font-family:Tahoma,Arial,sans-serif; font-size:14pt; font-weight:bold;"><%=strf%> </SPAN><br>

<HR>

<SPAN ID="txtData">

<%=strResult%>

</SPAN>

 

<HR><SPAN style="font-family:Tahoma,Arial,sans-serif ;font-size:8pt;"> <A style="font-family:Tahoma,Arial,sans-serif ;font-size:8pt;" HREF="http:'openlab.biti.edu.cn/xml/" target="_blank">BITI XML UNION</A> -

<A CLASS="cite" HREF="mailto:xiaoleilong@mail.biti.edu.cn">stan</A> </SPAN>

</BODY>

</HTML>
0 0

相关博文

我的热门文章

img
取 消
img