3 Replies Latest reply on Mar 26, 2009 9:37 AM by Gregory Lafrance

    Problem testing for empty value

    Handycam Level 1
      I just made an XML-driven application where nodes have an optional image, which I would enter in an image node in the XML file, as in:

      <image>/images/myimage.jpg</image> or, if no image, <image></image>

      In the initial application, there were a few images and the rest were empty nodes. Worked fine, it seems.

      In my second release, this time the xml file calls for no images, all the image nodes are empty. So now I get a runtime error, "cannot load ''", which would seem it is trying to load an image file of an empty string.

      I have also tried setting the nodes that don't need an image to have a string value of "none" and then testing for that in the IF statement, same thing. I can only get this XML to load and the app to run if I comment out the IF block in the attached code.

      Any ideas?