CSDN博客

img stationxp

XML文件源码察看器(四)

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

//给指令节点着色


function renderInstruction(nodNode,intLevel)


{


    var strNodes = '';


    var intCount = 0;


    var intNode = 0;


    var nodAttrList;


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




    strNodes+="?"


    strNodes+=nodNode.nodeName+" ";


    // check there are some attributes


    strNodes+=nodNode.nodeValue;


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


    return strNodes;


}




function getIndent(intLevel)


{


    // create a string of spaces


    var strIndent = '';


    for (intIndent = 0; intIndent < intLevel; intIndent++)


    strIndent += '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'


    return strIndent;


}




</SCRIPT>


<HR><SPAN CLASS="cite"> <A CLASS="cite" 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