Hi patrizio have a look here http://roundcrisis.com/2009/06/09/gwt-ext-combobox/ there is a sample there that does that( ie loading xml into a recordstore), make sure you 1) put the store load at the end 2) if you are using eclipse you need to stop the hosted mode and start again otherwise it wont load the first time, i know it shouldnt but thats what worked for me. good luck Andrea
On Thu, Jun 25, 2009 at 9:14 AM, Patrizio De Michele <[email protected]>wrote: > Hi, > i'm trying to use an xmlreader to automatically load data from an xml. > This is a sample xml: > > <?xml version="1.0" encoding="ISO-8859-1"?> > <Domain DOMAIN_ID="P_ESTE" DOMAIN_NAME="C.estensioni"> > <value code="2">Trasp.liquidi infiammabili</value> > <value code="3">Trasp.liquidi Combustibili</value> > </Domain> > > I want the attribute code and the content of value inside a 2 dimensional > array. > so i try in this way: > > RecordDef recordDef = new RecordDef(new FieldDef[]{ > new StringFieldDef("code", "@code"), > new StringFieldDef("value", "text()")}); > > final XmlReader reader = new XmlReader("value", recordDef); > > final Store cmbStore = new Store(reader); > > cmbStore.loadXmlData(response.getText(), false) > > where response contains an xml with the same structure of the upper xml > received from a servlet. > > Can someone help me? Maybe i'm doing something wrong with xpath? > I see the gwt-ext sources and seems that have an xpath compiler so i > think i should also access attributes and text... > > Bye Patrizio > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "GWT-Ext Developer Forum" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/gwt-ext?hl=en -~----------~----~----~----~------~----~------~--~---
