Hi,
I have a code which is written for read the xml data. and the xml file contains the optional values, so some time the elements are present there some times not. In this case how can i set a default value for that in action script 3.0.
When i tried to trace the value that area is skipping. So is there any other method to trace-out is that element is present or not something like that??
Edit:
private function xmlListener(evt:Event) {
xmlValue = new XML(evt.target.data);
_videoURL = xmlValue.videoUrl;
_setWidth = xmlValue.setWidth;
_setHeight = xmlValue.setHeight;
}
Suppose the set 'setHeight' element is not present in the XML then what would be the value of _setHeight ??
Edit 2:
<?xml version="1.0" encoding="UTF-8"?>
<settings>
<videoUrl>videos.flv</videoUrl>
<setWidth>500</setWidth>
</settings>