Hi,

I am a newbie to XML and I encountered a problem that I couldn't solve.

There's a template that my boss gave me so I can practice on my skills; however, I was able to do everything else but to add additional BIG images.

Code:
xml code:

<?xml version="1.0" encoding="iso-8859-1"?>
<root>

<pageGallery nameGallery="girl 1" name="gallery1" line="1" maxImages="4">

<titleImages>
<smallImages>_gallery_girl1_1.png</smallImages>
<bigImages>_gallery_biggirl1_1.jpg</bigImages>
<infoImages><![CDATA[blahblah]]></infoImages>
<infoImages1><![CDATA[blahblah]]></infoImages1>
<infoImages2><![CDATA[blahblah]]></infoImages2>
<infoImages3><![CDATA[blahblah]]]></infoImages3>
</titleImages>

<pageGallery nameGallery="girl 2" name="gallery2" line="1" maxImages="4">

<titleImages>
<smallImages>_gallery_girl2_1.png</smallImages>
<bigImages>_gallery_biggirl2_1.jpg</bigImages>
<infoImages><![CDATA[blahblah]]></infoImages>
<infoImages1><![CDATA[blahblah]]></infoImages1>
<infoImages2><![CDATA[blahblah]]></infoImages2>
<infoImages3><![CDATA[blahblah]]]></infoImages3>
</titleImages>
The above codes consider 2 sets, and there were 4 sets in default settings, after I added codes to total 10 sets in the list, <smallImages> and all <infoImages> working just fine, but <bigImages> will only load 4 instead of all 10.

Here's the parser:
Code:
import mx.utils.Delegate;

class gs.dataTransfer.XMLParser {
	static var CLASS_REF = gs.dataTransfer.XMLParser;
	private static var _parsers_array:Array;
	private var _url_str:String;
	private var _onComplete_func:Function;
	private var _xml:XML;
	private var _results_obj:Object;
	var parse:Function; //Just for backward compatibility. It's essentially an alias pointing to the initLoad() function.
	
	function XMLParser() {
		parse = initLoad; //Just for backward compatibility. It's essentially an alias pointing to the initLoad() function.
		if (_parsers_array == undefined) {
			_parsers_array = [];
		}
		_parsers_array.push(this);
	}
	
	static function load(url_str:String, onComplete_func:Function, results_obj:Object):XMLParser {
		var parser_obj = new XMLParser();
		parser_obj.initLoad(url_str, onComplete_func, results_obj);
		return parser_obj;
	}
	
	static function sendAndLoad(toSend_obj:Object, url_str:String, onComplete_func:Function, results_obj:Object):XMLParser {
		var parser_obj = new XMLParser();
		parser_obj.initSendAndLoad(toSend_obj, url_str, onComplete_func, results_obj);
		return parser_obj;
	}
	
	
	function initLoad(url_str:String, onComplete_func:Function, results_obj:Object) {
		if (results_obj == undefined) {
			results_obj = {};
		}
		_results_obj = results_obj;
		_url_str = url_str;
		_onComplete_func = onComplete_func;
		_xml = new XML();
		_xml.ignoreWhite = true;
		_xml.onLoad = Delegate.create(this, this.parseLoadedXML);
		_xml.load(_url_str);		
	}
	
	function initSendAndLoad(toSend_obj:Object, url_str:String, onComplete_func:Function, results_obj:Object) {
		if (results_obj == undefined) {
			results_obj = {};
		}
		_results_obj = results_obj;
		_url_str = url_str;
		_onComplete_func = onComplete_func;
		if (toSend_obj instanceof XML) {
			var xmlToSend_obj = toSend_obj;
		} else {
			var xmlToSend_obj = XMLParser.objectToXML(toSend_obj);
		}
		_xml = new XML();
		_xml.ignoreWhite = true;
		_xml.onLoad = Delegate.create(this, this.parseLoadedXML);
		xmlToSend_obj.sendAndLoad(_url_str, _xml);		
		
	}	
	
	function searchAndReplace(holder, searchfor, replacement) {
	var temparray = holder.split(searchfor);
	var holder = temparray.join(replacement);
	return (holder);
	}
	
	
	private function parseLoadedXML(success_boolean) {
		if (success_boolean == false) {
			trace("XML FAILED TO LOAD! ("+_url_str+")");
			_onComplete_func(false);
			return;
		}
		var x = this._xml;
		_root.xmlNodes = x;
		var c = x.firstChild.firstChild; //"c" is for current_node
		var last_node = x.firstChild.lastChild;
		x.firstChild.obj = _results_obj; //Allows us to tack on all the arrays and objects to this instance for easy retrieval by the user. If this causes a problem, we could create a public object variable that holds everything, but this simplifies things for the user.
		while(c != undefined) {
			//We ran into an issue where Flash was creating an extra subnode anytime we had content in a node like <NODE>My Content</NODE>. The tip off is when the nodeName is null and the nodeType is 3 (text).
			if (c.nodeName == null && c.nodeType == 3) {
				c.parentNode.obj.value = searchAndReplace(c.nodeValue, '\r\n', '');
			} else {
				var o = {};
				for (var att in c.attributes) {
					o[att] = c.attributes[att];
				}
				var pn = c.parentNode.obj;
				if (pn[c.nodeName] == undefined) {
					pn[c.nodeName] = [];
				}
				c.obj = o;
				pn[c.nodeName].push(o);
			}
			
			if (c.childNodes.length > 0) {
				c = c.childNodes[0];
			} else {
				var next_node = c;
				while(next_node.nextSibling == undefined && next_node.parentNode != undefined) {
					next_node = next_node.parentNode;
				}
				c = next_node.nextSibling;
				if (next_node == last_node) {
					c = undefined;
				}
			}
		}
		_onComplete_func(true, _results_obj, x);
	}
	
	//Allows us to translate an object (typically with arrays attached to it) back into an XML object. This is useful when we need to send it back to the server or save it somewhere.
	public static function objectToXML(o:Object, rootNodeName_str:String):XML {
		if (rootNodeName_str == undefined) {
			rootNodeName_str = "XML";
		}
		var xml:XML = new XML();
		var n:XMLNode = xml.createElement(rootNodeName_str);
		var props = [];
		var prop;
		for (var p in o) {
			props.push(p);
		}
		for (var p = props.length - 1; p >= 0; p--) { //By default, attributes are looped through in reverse, so we go the opposite way to accommodate for this.
			prop = props[p];
			if (typeof(o[prop]) == "object" && o[prop].length > 0) { //Means it's an array!
				arrayToNodes(o[prop], n, xml, prop);
			} else if (prop == "value") {
				var tn:XMLNode = xml.createTextNode(o.value);
				n.appendChild(tn);
			} else {
				n.attributes[prop] = o[prop];
			}
		}
		xml.appendChild(n);
		return xml;
	}
	
	//Recursive function that walks through any sub-arrays as well...
	private static function arrayToNodes(ar:Array, parentNode:XMLNode, xml:XML, nodeName_str:String):Void {
		var chldrn = [];
		var props:Array;
		var prop;
		var n:XMLNode;
		var o:Object;
		for (var i = ar.length - 1; i >= 0; i--) {
			n = xml.createElement(nodeName_str);
			o = ar[i];
			props = [];
			for (var p in o) {
				props.push(p);
			}
			for (var p = props.length - 1; p >= 0; p--) { //By default, attributes are looped through in reverse, so we go the opposite way to accommodate for this.
				prop = props[p];
				if (typeof(o[prop]) == "object" && o[prop].length > 0) { //Means it's an array!
					arrayToNodes(o[prop], n, xml, prop);
				} else if (prop != "value") {
					n.attributes[prop] = o[prop];
				} else {
					var tn:XMLNode = xml.createTextNode(o.value);
					n.appendChild(tn);
				}
			}
			chldrn.push(n);
			//parentNode.appendChild(n);
		}
		for (var i = chldrn.length - 1; i >= 0; i--) {
			parentNode.appendChild(chldrn[i]);
		}
	}
	
	public function destroy():Void {
		delete _xml;
		for (var i = 0; i < _parsers_array.length; i++) {
			if (this == _parsers_array[i]) {
				_parsers_array.splice(i, 1);
			}
		}
		destroyInstance(this);
	}
	
	static function destroyInstance(i:XMLParser):Void {
		delete i;
	}
	
//---- GETTERS / SETTERS --------------------------------------------------------------------
	static function get active_boolean():Boolean {
		if (_parsers_array.length > 0) {
			return true;
		} else {
			return false;
		}
	}
	
}
Hope someone could help me, if additional info required, please let me know and I'll post ASAP.