Generate Hash or Json from the table and then Generate XML from Hash or Json using Mr. Cristobal's class.
Code: Select all
[{"id":2,"CODE":"MT","NAME":"montana"},{"id":4,"CODE":"ND","NAME":"North Dakota"},{"id":5,"CODE":"SD","NAME":"South Dakota"},{"id":6,"CODE":"WY","NAME":"Wyoming"},{"id":7,"CODE":"WI","NAME":"Wisconsin A"},{"id":14,"CODE":"MA","NAME":"Massachusetts"},{"id":15,"CODE":"NE","NAME":"Nebraska hola"},{"id":16,"CODE":"NY","NAME":"New York 2"},{"id":17,"CODE":"PA","NAME":"Pennsylvania"},{"id":18,"CODE":"CT","NAME":"Connecticut"},{"id":19,"CODE":"RI","NAME":"RRRRRDIsland"},{"id":20,"CODE":"NJ","NAME":"New Jersey"},{"id":21,"CODE":"IN","NAME":"Indiana"},{"id":22,"CODE":"NV","NAME":"Nevada xxx"},{"id":23,"CODE":"UT","NAME":"Utah"},{"id":24,"CODE":"CA","NAME":"California"},{"id":25,"CODE":"OH","NAME":"Ohio"},{"id":26,"CODE":"IL","NAME":"Illinois"},{"id":27,"CODE":"DC","NAME":"District of Columbia"},{"id":28,"CODE":"DE","NAME":"Delaware Kansas"},{"id":30,"CODE":"MD","NAME":"Maryland"},{"id":31,"CODE":"CO","NAME":"Colorado"},{"id":32,"CODE":"KY","NAME":"Kentucky"},{"id":33,"CODE":"KS","NAME":"Kansas"},{"id":34,"CODE":"VA","NAME":"Virginia"},{"id":35,"CODE":"MO","NAME":"Missouri"},{"id":36,"CODE":"AZ","NAME":"Arizona"},{"id":37,"CODE":"OK","NAME":"Oklahoma"},{"id":38,"CODE":"NC","NAME":"North Carolina"},{"id":39,"CODE":"TN","NAME":"Tennessee"},{"id":40,"CODE":"TX","NAME":"Texas"},{"id":42,"CODE":"AL","NAME":"Alabama"},{"id":43,"CODE":"MS","NAME":"Mississippi"},{"id":44,"CODE":"GA","NAME":"Georgia"},{"id":45,"CODE":"SC","NAME":"South Carolina"},{"id":46,"CODE":"AR","NAME":"Arkansas"},{"id":47,"CODE":"LA","NAME":"Louisiana"},{"id":48,"CODE":"FL","NAME":"Florida"},{"id":49,"CODE":"MI","NAME":"Michigan"},{"id":50,"CODE":"HI","NAME":"SDFS"},{"id":51,"CODE":"AK","NAME":"Alaska"},{"id":52,"CODE":"CY","NAME":"Cyprus"},{"id":53,"CODE":"10","NAME":"VILIAN ARRAES"}]
But when we talk about XML, we should also be clear about the format. Do we need field attributes (like field type, width, etc) embedded in the xml file. So, it is not as straight forward