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);
}
}
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---