using for loop inside xsl

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • innova
    New Member
    • Mar 2008
    • 1

    using for loop inside xsl

    Hi,

    I am using a for loop inside xsl as follows,

    [CODE=javascript]<SCRIPT LANGUAGE="JavaS cript">

    function xmlParse() {
    source = document.XMLDoc ument;
    xNode = source.getEleme ntsByTagName("d ata_x").item(0) ;
    strXNode = xNode.text;
    for (i = 0; i < strXNode.length ; i++) {
    alert(strXNode) ;
    }
    }
    </SCRIPT>
    [/CODE]
    It threw an error,so i used <![CDATA[ to escape '<' operator, but still i got error

    please suggest me a soln.
    Last edited by acoder; Mar 12 '08, 02:43 PM. Reason: Added code tags
  • pronerd
    Recognized Expert Contributor
    • Nov 2006
    • 392

    #2
    If you are new to using forms you may want to google rules on proper form etiquette. It will help you get much better and faster responses. The quality of the responses that can be provided are limited by the quality of the information posted.

    Specificly :

    1. Just saying "I got an error" with no details about the error limits what help can be provided.

    2. The file that is being procssed that is failing should really be provided if you are expecting people to help you with its syntax.

    3. Since this is really more of JavaScript question it would be a good idea to spcificly which browser was being used.

    4. Since this is really more of a JavaScript question it would be better off in a form for JavaScript.

    Comment

    • jkmyoung
      Recognized Expert Top Contributor
      • Mar 2006
      • 2057

      #3
      use &lt; for <

      darn char limit. I think this is totally an xml question. Assuming you got a "malformed xml" error or such.

      Comment

      Working...