hazy1 wrote: > Add the xml module to your gwt.xml. > > > On Jan 31, 11:03 am, taha <taha...@gmail.com> wrote: > >> i wanna use XMLParser class in my project but i've faced below error >> message >> "No source code is available for type >> com.google.gwt.xml.client.XMLParser; did you forget to inherit a >> required module?" >> >> my code is >> >> package org.nts.client; >> >> import com.google.gwt.user.client.ui.DecoratorPanel; >> import com.google.gwt.user.client.ui.VerticalPanel; >> import com.google.gwt.user.client.ui.ListBox; >> import com.google.gwt.user.client.HTTPRequest; >> import com.google.gwt.user.client.ResponseTextHandler; >> import com.google.gwt.xml.client.*; >> >> public class IntroPanel extends DecoratorPanel { >> >> static final String TERM_PATH = "term.xml"; >> static final String TERM_TAG = "term"; >> static final String ATTRIBUTE_ID= "id"; >> static final String ATTRIBUTE_NAME = "name"; >> private VerticalPanel panel = new VerticalPanel(); >> private ListBox termList = new ListBox(false); >> >> public IntroPanel() { >> setWidth("900px"); >> HTTPRequest.asyncGet(TERM_PATH, new ResponseTextHandler() { >> public void onCompletion(String responseText) { >> XMLParser.parse(responseText); >> NodeList terms = >> document.getElementsByTagName(TERM_TAG); >> for (int i=0; i < terms.getLength(); i++) { >> Element currentElement = >> (Element)terms.item(i); >> String item = >> currentElement.getAttribute(ATTRIBUTE_ID); >> String value = >> currentElement.getAttribute(ATTRIBUTE_NAME); >> termList.addItem(item, value); >> } >> } >> }); >> >> panel.add(termList); >> } >> >> } >> > > > > thank you for instruction problem solved by adding gwt.xml modul <inherits name ="com.google.gwt.xml.XML"/>
--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~----------~----~----~----~------~----~------~--~---
begin:vcard fn;quoted-printable:=D8=A7=D8=AD=D9=85=D8=AF =D9=85=D9=88=D8=B0=D9=86 n;quoted-printable;quoted-printable:=D9=85=D9=88=D8=B0=D9=86;=D8=A7=D8=AD=D9=85=D8=AF email;internet:taha...@gmail.com note:taha.myvidoop.com version:2.1 end:vcard