java - W3C module does not exist -
i try y! weather xml parsing sake of learning using bluej. when compiled class, bluej giving me error: package org.w3c not exist
here code:
import java.net.url; import java.io.inputstream; import javax.xml.parsers.documentbuilderfactory; import javax.xml.parsers.documentbuilder; import org.w3c.*; public class weatherapp { public static void main(string[] args) { url xmlurl = new url("http://weather.yahooapis.com/forecastrss?w=22722924&u=c"); inputstream xml = xmlurl.openstream(); documentbuilderfactory dbf = documentbuilderfactory.newinstance(); documentbuilder db = dbf.newdocumentbuilder(); document doc = db.parse(xml); xml.close(); system.out.println(doc); } }
what go possibly wrong here? , how fix it? thanks
Comments
Post a Comment