Question : XML issues in flex

I am using Flex Builder 3.0 and i keep getting XML issues when loading XML data using mx:HTTPService.  The XML is formated properly because I have tested it in Internet Explorer.  Is there a method where I can use in ActionScript so that if there is a Invalid formatted record it doesn't stop loading the data but skips over that XML record?

I get the following error code



Error #1096: XML parser failure
Code Snippet:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
/* This is the datagrid for loading the xml data */
	
		
			
			
			      
			          
			                  
			          
			      
			     
			
			
			
		
		   
		           
		                     
		           
		   
		
			
		
			
						
		
	
	
		
			
				
			
			
				
			
			
				
			
			
				
			
		
	
	
		
			
				
				
			
			
			
			
				
				
			
		
		
			
			
			
			
			
				
				
			
		
	
Open in New Window Select All

Answer : XML issues in flex

to answer your question...

">>  Is there a method where I can use in ActionScript so that if there is a Invalid formatted record
>> it doesn't stop loading the data but skips over that XML record?"


no...  your XML has to be valid... even using a try catch in actionscript is not the answer, because the data has to be well formed BEFORE it gets into the programming.


I would recommend restricting who can update the XML, AFTER you make sure it is completely validated and accessible to AS 3 code.


rp / ZA

Random Solutions  
 
programming4us programming4us