Where to locate Class XmlParser??

Hi,
I compiled sample code from this site and I got error while building it....can anybody quickly point the solution?
I am using WTK 2.0...This is the output ...
C:\WTK22\apps\Sun\src\RSSParser.java:40: cannot find symbol
symbol : class XmlParser
location: class RSSParser
XmlParser parser = new XmlParser(reader);
^
C:\WTK22\apps\Sun\src\RSSParser.java:40: cannot find symbol
symbol : class XmlParser
location: class RSSParser
XmlParser parser = new XmlParser(reader);
^
C:\WTK22\apps\Sun\src\RSSParser.java:41: cannot find symbol
symbol : class ParseEvent
location: class RSSParser
ParseEvent pe = null;
^
C:\WTK22\apps\Sun\src\RSSParser.java:44: cannot find symbol
symbol : variable Xml
location: class RSSParser
parser.read(Xml.START_TAG, null, "rss");
^
C:\WTK22\apps\Sun\src\RSSParser.java:46: cannot find symbol
symbol : variable Xml
location: class RSSParser
parser.read(Xml.START_TAG, null, "channel");
^
C:\WTK22\apps\Sun\src\RSSParser.java:52: cannot find symbol
symbol : variable Xml
location: class RSSParser
if (pe.getType() == Xml.START_TAG) {
^
C:\WTK22\apps\Sun\src\RSSParser.java:57: cannot find symbol
symbol : variable Xml
location: class RSSParser
while ((pe.getType() != Xml.END_TAG) ||
^
C:\WTK22\apps\Sun\src\RSSParser.java:60: cannot find symbol
symbol : variable Xml
location: class RSSParser
if (pe.getType() == Xml.START_TAG &&
^
C:\WTK22\apps\Sun\src\RSSParser.java:65: cannot find symbol
symbol : variable Xml
location: class RSSParser
else if (pe.getType() == Xml.START_TAG &&
^
C:\WTK22\apps\Sun\src\RSSParser.java:70: cannot find symbol
symbol : variable Xml
location: class RSSParser
else if (pe.getType() == Xml.START_TAG &&
^
C:\WTK22\apps\Sun\src\RSSParser.java:79: cannot find symbol
symbol : variable Xml
location: class RSSParser
while ((pe.getType() != Xml.END_TAG) ||
^
C:\WTK22\apps\Sun\src\RSSParser.java:84: cannot find symbol
symbol : variable Xml
location: class RSSParser
if (pe.getType() == Xml.END_TAG &&
^
12 errors
com.sun.kvem.ktools.ExecutionException
Build failed
regards,
Momi

thanks Supareno!!
anyways,i didnt create any package..Do i still need to add external jar???
here is the output:
C:\WTK22\apps\XMLTEST\src\XMLTest.java:79: newPullParser() in org.xmlpull.v1.XmlPullParserFactory cannot be applied to (java.io.InputStreamReader)
           XmlPullParser xpp =factory.newPullParser(in);
                                     ^
C:\WTK22\apps\XMLTEST\src\XMLTest.java:101: cannot find symbol
symbol  : class ParseEvent
location: class XMLTest
            ParseEvent event = xpp.read();
            ^
C:\WTK22\apps\XMLTEST\src\XMLTest.java:101: cannot find symbol
symbol  : method read()
location: interface org.xmlpull.v1.XmlPullParser
            ParseEvent event = xpp.read();
                                  ^
C:\WTK22\apps\XMLTEST\src\XMLTest.java:103: cannot find symbol
symbol  : variable Xml
location: class XMLTest
                case Xml.START_TAG:
                     ^
C:\WTK22\apps\XMLTEST\src\XMLTest.java:108: cannot find symbol
symbol  : variable Xml
location: class XMLTest
                case Xml.END_TAG:
                     ^
C:\WTK22\apps\XMLTEST\src\XMLTest.java:113: cannot find symbol
symbol  : variable Xml
location: class XMLTest
                case Xml.TEXT:
                     ^
C:\WTK22\apps\XMLTEST\src\XMLTest.java:118: cannot find symbol
symbol  : variable Xml
location: class XMLTest
                case Xml.END_DOCUMENT:
                     ^
7 errors
com.sun.kvem.ktools.ExecutionException
Build failedCode:
import java.io.*;
import java.util.*;
import javax.microedition.lcdui.*;
import javax.microedition.midlet.*;
import org.kxml2.io.*;
import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserException;
import org.xmlpull.v1.XmlPullParserFactory;
* Simple MIDlet that demonstrates how an XML document can be
* parsed using kXML or NanoXML.
public class XMLTest extends MIDlet {
    // Our XML document -- normally this would be something you
    // download.
    private static String xmlDocument =
        "<list><item>apple</item>" +
              "<item>orange</item>" +
              "<item>pear</item></list>";
    private Display display;
    private Command exitCommand = new Command( "Exit",
                                               Command.EXIT, 1 );
    public XMLTest(){
    protected void destroyApp( boolean unconditional )
                       throws MIDletStateChangeException {
        exitMIDlet();
    protected void pauseApp(){
    protected void startApp() throws MIDletStateChangeException {
        if( display == null ){ // first time called...
            initMIDlet();
    private void initMIDlet(){
        display = Display.getDisplay( this );
        String [] items;
        items = parse( xmlDocument );
        display.setCurrent( new ItemList( items ) );
    public void exitMIDlet(){
        notifyDestroyed();
    // Parses a document using kXML, looking for "item"
    // nodes and returning their content as an
    // array of strings.
    private String[] parse( String xml ){
        try {
            ByteArrayInputStream bin =
                            new ByteArrayInputStream( xml.getBytes() );
            InputStreamReader in = new InputStreamReader( bin );
        XmlPullParserFactory factory = XmlPullParserFactory.newInstance(
           System.getProperty(XmlPullParserFactory.PROPERTY_NAME), null);
           factory.setNamespaceAware(true);
           XmlPullParser xpp =factory.newPullParser(in);
            //XmlParser parser = new XmlParser( in );
            Vector items = new Vector();
            parseItems( xpp, items );
            String[] tmp = new String[ items.size() ];
            items.copyInto( tmp );
            return tmp;
        catch( IOException e ){
            return new String[]{ e.toString() };
    private void parseItems( XmlPullParser xpp, Vector items )
                                     throws IOException {
        boolean inItem = false;
        while( true ){
            ParseEvent event = xpp.read();
            switch( event.getEventType() ){
                case Xml.START_TAG:
                    if( event.getName().equals( "item" ) ){
                        inItem = true;
                    break;
                case Xml.END_TAG:
                    if( event.getName().equals( "item" ) ){
                        inItem = false;
                    break;
                case Xml.TEXT:
                    if( inItem ){
                        items.addElement( event.getText() );
                    break;
                case Xml.END_DOCUMENT:
                    return;
    // Simple List UI component for displaying the list of
    // items parsed from the XML document.
    class ItemList extends List implements CommandListener {
        ItemList( String[] list ){
            super( "Items", IMPLICIT, list, null );
            addCommand( exitCommand );
            setCommandListener( this );
        public void commandAction( Command c, Displayable d ){
            if( c == exitCommand ){
                exitMIDlet();
}

Similar Messages

  • Where are Java classes in Forms running

    Hi,
    I've got a question concerning the architecture of Java in Forms.
    There are two possibilities to deploy Java classes for the use in Forms:
    1. As a jar archive, defined in formsweb.cfg
    The archives definied in parameter archive_jini are downloaded when the form is called for the first time. The Java class is then running in a JRE on the client.
    2. In the codebase, not archived.
    The Java class has to be placed in the Forms codebase (%9iDS_HOME%\forms90\java), with the full package structure (e. g. oracle\forms\demos\beans\Hyperlink.class).
    My question is: Where will the class run in the second configuration? I suppose, on the server side. Am I right?
    Thanks for your help.
    Andreas

    NO in that case it still runs in the browser JVM, using Jars or classes in this case only effects the downloading and caching - not the execution location.
    Java code is only executed on the application server if you have used the Java importer feature to create PL/SQL stubs.

  • IE 6 won't locate class file???

    Can someone tell me what's going on here:
    I've created a simple Hello world applet and compiled it.
    When I use the appletviewer to view the html page I've created for it, it works fine, no problems.
    However if I try to view it in Internet Explorer, I just get a grey box where my applet should be and and the message "class HelloWorld not found" in the taskbar.
    I can't understand why it'll work in the appletviewer and not in Internet Explorer.

    <HTML>
    <HEAD>
    <TITLE>A Simple Program</TITLE>
    </HEAD>
    <BODY>
    Here is the output of my program:
    <APPLET CODE="HelloWorld.class" WIDTH=150 HEIGHT=25>
    </APPLET>
    </BODY>
    </HTML>
    I don't think it's a problem with the HTML because it if it did, it wouldn't work in the appletviewer either. I think it might have something to do with with how IE locates class files?

  • Problem creating package structure and where is my .class file??????

    Working on Tomcat I have my folder structure like this...
    webapps
    ->app_root
    ->WEB-INF
    ->classes
    ->src
    -> .java files
    ->META_INF
    In the command prompt i compile using this
    c:\Program Files\Apache Tomcat 4.0\webapps\Murthy\WEB-INF\classes>javac -d src\*.java
    and in my java files I have the package structure mentioned as
    package com.acme;
    after compiling i expected this to happen for me.
    webapps
    ->app_root
    ->WEB-INF
    ->classes (in WEB-INF)
    ->com (in classes)
    ->acme (in com)
    -> .class files (in acme)
    ->src (in WEB-INF)
    -> .java files(In src)
    ->META_INF
    The funiest part for me started he when i compiled the file
    c:\Program Files\Apache Tomcat 4.0\webapps\Murthy\WEB-INF\classes>javac -d src\one.java
    It compiled successfully without giving me any error but no package structure was created and THERE IS NO one.class file anywhere in my system.....Then how did it compile my file and where is the .class file.
    I think am worng somewhere but unable to locate it.
    Can somebody pull me out of thiss stuf??? Need to do it fast.
    Thanx.

    c:\Program Files\Apache Tomcat 4.0\webapps\Murthy\WEB-INF\classes>javac -d src\*.java
    The command you posted does not have a source file specification. You are telling the compiler to put the .class files in src\*.java but you are not specifying any .java files. It looks like your command should be javac -d . src\*.java

  • Unable to locate class: com.iplanet.portalserver.auth.service.LoginServlet

    Trying to access the portal server via http://portalserver:port get a
    500 error response. Looking at the error logs I find this:
    [05/Dec/2001:08:46:34] warning (21789): Unable to locate class:
    com.iplanet.portalserver.auth.service.LoginServlet
    (java.lang.ClassNotFoundException:
    com.iplanet.portalserver.auth.service.LoginServlet)
    [05/Dec/2001:08:46:34] warning (21789): Internal error: Failed to get
    GenericServlet. (uri=/login,SCRIPT_NAME=/login)
    Any thoughts?
    -matt

    Found the problem...
    The iPlanet Portal server jars files where not specified in the
    webserver's jvm12.conf file.
    -matt
    Matt MacDonald wrote:
    Trying to access the portal server via http://portalserver:port get a
    500 error response. Looking at the error logs I find this:
    [05/Dec/2001:08:46:34] warning (21789): Unable to locate class:
    com.iplanet.portalserver.auth.service.LoginServlet
    (java.lang.ClassNotFoundException:
    com.iplanet.portalserver.auth.service.LoginServlet)
    [05/Dec/2001:08:46:34] warning (21789): Internal error: Failed to get
    GenericServlet. (uri=/login,SCRIPT_NAME=/login)
    Any thoughts?
    -matt

  • Where to locate and how to use the filter thershould to binarized image

    Good morning friends. I am using
    Labview with VDM and let me know where to locate and how to use the
    filter thershould. Also that parameters used to binarized image captured
    via webcam and display it in black and white.
    Thank you very
    much.

    Is the image that you are getting a RGB one? Use color plane extraction and then use a binary threshold to convert it into a binary image. You can also directly use a color threshold and convert a rgb (color) image to a binary image.

  • Where is located or where to find the list of printer drivers included in Windows 7

    Hello,
    Like the http://support.microsoft.com/kb/293360 for XP
    I wish to have the list of 'built-in' print drivers on Windows 7
    Didn't find any from technet, KB, Forum, ...
    Maybe wrong search critera or else.
    May someone know where is located the list I wish
    In advance thank you

    Hello,
    First thank you for your answer.
    But, and I think you haven't folow the URL provided previously, I don't want to add or install a printer.
    I wish to have a list of built-in drivers for printer's in windows seven (like the URL provided before)
    Can you, please, have a look at this link : http://support.microsoft.com/kb/293360
    ==> I wish the same but for windows seven
    Thanks

  • Corresponding class for Locator Class in BPEL 11g.

    Hi All,
    I am using JDev and SOA 11.1.1.3.
    I am trying to get some process info from MDS using java Embedding activity in my BPEL.
    I am able to do this in 10.1.3.4 but in 11g I am getting error.
    In Java code I observed it is unable to load Locator Class.
    Is there any new class doing same functionality as Locator in 11g.
    Please show the way.
    Regards
    PavanKumar.M

    Hi Folks,
    Please provide me some ways
    Regards
    PavanKumar.M

  • Could not create WMI locator class (80040154) - Win7 x64 OSD

    Hello All,
    I'm attempting to deploy a Win7 x64 OS to a Dell Optiplex 3010 through SCCM 2012 via PXE, a process I've done many times in the last few months. All of a sudden, on this one machine, I can't get it to work.
    The first strange thing that happened is, after the initial check for a PXE server I am told to "Press F12 for network service boot". I've never seen that before on any other system. Secondly, after supplying the password to begin the OSD process
    I'm met with error message 80040154. An excerpt from my log file is below:
    spLocator.createInstance( ((bUseAdminLocator == true) ? CLSID_WbemAdministrativeLocator : CLSID_WbemLocator ) ), HRESULT=80040154 (e:\nts_sccm_release\sms\framework\core\ccmcore\wminamespace.cpp,264)    TSPxe    1/8/2015 10:00:45
    AM    268 (0x010C)
    Could not create WMI locator class (80040154)    TSPxe    1/8/2015 10:00:45 AM    268 (0x010C)
    spNamespace.Open(c_szCIMv2Namespace), HRESULT=80040154 (e:\qfe\nts\sms\framework\tscore\tspolicy.cpp,604)    TSPxe    1/8/2015 10:00:45 AM    268 (0x010C)
    Failed to connect to WMI namespace \\.\ROOT\CIMV2 (Code 0x80040154)    TSPxe    1/8/2015 10:00:45 AM    268 (0x010C)
    TS::Policy::GetClientIdentity (&m_oHttpTransport, m_sSiteCode, sMediaGuid.c_str(), m_sClientGUID, m_sNetbiosName, bUnknown, sServerNames, sImportedClientIdentity), HRESULT=80040154 (e:\qfe\nts\sms\framework\tscore\tspolicy.cpp,867)    TSPxe  
     1/8/2015 10:00:45 AM    268 (0x010C)
    I see this error happening for people attempting a Win 8.1 OSD without the proper WMI file. But that's not what I'm trying to do. This exact process has worked on many other Optiplex 3010's and 3020's since May when I started using it. Any suggestions?

    Ok, here's what was happening. Boy do I feel stupid.
    When I went to enter this latest batch of computers into SCCM, I went into the BIOS, copied the MAC, and used it as I should to import the system into SCCM. I assigned it to my OSD collection, then deployed my OSD TS to that collection. This is when I started
    having major issues. Reason being: I transposed two of the digits in the MAC I entered. As a result, the computer booted as part of the “Unknown Systems” collection and was assigned a generic OSD TS that didn’t contain the necessary drivers to complete. I
    never assigned a TS to that collection, and I'm the only one that's been using SCCM for OSD. I can only assume someone else was playing around with it trying to learn and did this themselves.
    When I removed the outdated boot image the Unknown Computers TS was supposed to use, I began being unable to even PXE boot (of course). After trying many and varied solutions (including double-checking the MAC I had written down
    incorrectly), thinking it was a PXE or boot image issue I began looking at the PXE boot logs on my DP. I noticed it kept saying that there were no advertisements to this system, which made no sense. I had deployed an OSD TS to it 5 minutes ago! I finally
    noticed the MAC address was incorrect and fixed it. Guess what? It’s imaging as I type.
    Thanks for all the help guys - lesson learned.

  • Please! WHY? Why does the main class cannot find symbol symbol : constructor Car(double) location: class Car?

    Why does the main class cannot find symbol symbol : constructor Car(double) location:
    class Car .. ??
    class Car
    { //variable declaration
    double milesStart; double milesEnd; double gallons;
    //constructors
    public Car(double start, double end, double gall)
    { milesStart = start; milesEnd = end; gallons = gall; }
    void fillUp(double milesE, double gall)
    { milesEnd = milesE; gallons = gall; }
    //methods
    double calculateMPG()
    { return (milesEnd - milesStart)/gallons; }
    boolean gashog() { if(calculateMPG()<15) { return true; } else { return false; } }
    boolean economycar() { if(calculateMPG()>30) { return true; } else { return false; } } }
    import java.util.*; class MilesPerGallon
    { public static void main(String[] args)
         double milesS, milesE, gallonsU;
         Scanner scan = new Scanner(System.in);
         System.out.println(\"New car odometer reading: 00000\");
          Car car = new Car(milesS); car.fillUp(milesE, gallonsU);
         System.out.println(\"New Miles: \" + milesE); milesE = scan.nextDouble();
         System.out.println(\"Gallons used: \" + gallonsU);
         gallonsU = scan.nextDouble();
         System.out.println( \"MPG: \" + car.calculateMPG() );
         if(car.gashog()==true) { System.out.println(\"Gas Hog!\");
          if(car.economycar()==true) { System.out.println(\"Economy Car!\");
         } System.out.println(\"\");
         milesS = milesS + milesE;
         System.out.println(\"Enter new miles\");
          milesE = scan.nextDouble();
         System.out.println(\"Enter gallons used: \");
          gallonsU = scan.nextDouble();
         car.fillUp(milesE, gallonsU);
         System.out.println(\"Initial miles: \" + milesS);
         System.out.println(\"New Miles: \" + milesE);
         System.out.println(\"Gallons used: \" + gallonsU);
         System.out.println( \"MPG: \" + car.calculateMPG() );
         System.out.println(\"\"); } }

    Why does the main class cannot find symbol symbol : constructor Car(double) location:
    class Car .. ??
    Please tell us which line of code you posted shows 'Car (double)'.
    The only constructor that I see is this one:
    Car(double start, double end, double gall)

  • Where are java classes stored?

    Does anyone where the java classes are physically stored?
    Is there any mechanism for getting them out?
    null

    Thanks, Irian,
    in the meantime I have found another solution. For Windows it works using environment variable IDE_USER_DIR.
    Create a new directory for the runtime files, e.g. C:\sqldevtemp
    Add environment variable IDE_USER_DIR with the value of "C:\sqldevtemp".
    Close SQL Developer, move (or copy if you want) all files from the old folder to the new folder and start SQL Developer again.
    Done.

  • Where is Location Services in the Settings Menu?

    Where is Location Services in the Settings Menu?  I ask because I was told to switch off some of the location services in the various apps to help me save battery life, but not too sure where Location Services is?

    AlliisonR: Location settings have been moved to the new Privacy section underneath Brightness & Wallpaper in Settings icon. Tricky but it's still there.
    Hope this helps!
    J

  • Where does a class reside?

    I confess, I'm new. I'm trying to learn Java progrmming and in the book "Teach Yourself Java in 21 Days" it says that an instance can reference and update class variables. Where are these class variables? Okay, they reside on a hard drive somewhere but does an instance have update authorization to the hard drive? or is the class held in memory somewhere and when and instance updates the class it is only in memory? It would not make sence if you are creating a dozen instances of the same class to keep going out to the hard drive for the creation of every instance.
    I'd appreciate any light you can shed on the subject.
    Thanks,
    Byron in Seattle

    You hit the nail on the head; it would be way too costly to run java having to read class file definitions from the hard drive every time you use one.
    Here's how it works:
    When you start java, all of the classes in the java software version you are using (1.3, 1.4, etc) are automatically loaded into memory along with the Java Virtual Machine (JVM)
    Next, everything in your classpath (well, not everything, but all .class files) will be loaded into memory.
    After that, classes can be 'bootstrapped' by using Class.forName(...)

  • I got an error message saying that update couldn't update because disk was full and it said to empty recycle bin, anyone know where to locate this mysterious elusive recycle bin?

    i got an error message saying that update couldn't update because disk was full and it said to empty recycle bin, anyone know where to locate this mysterious elusive recycle bin?

    arghineedhelp wrote:
    i got an error message saying that update couldn't update because disk was full and it said to empty recycle bin, anyone know where to locate this mysterious elusive recycle bin?
    On your computer.

  • Where to locate EKPO-PACKNO in ME23N

    Hi SAP Gurus,
    I am doing a BAPI mapping in BAPI_PO_CREATE, however I found that there is a Package Number with value "0000001", my question:-
    1. Where to locate the Package number in PO
    2. Is the package number generated by system or manually entered.
    3. Is Package number always be generated when everytime the PO is created
    4. Is the package number also available in Server order?
    5. Is the package number found in item level or header lever
    Thank you

    1) If your requirement is to find service item based on the purchase order. Then you can use BAPI_PO_GETDETAILS. This would give you all the service order items for the associated PO.
    In terms of table access, using EKPO-PACKNO to get the associated SUBPACKNO from ESLL. Once you have the Subpackno, use that subpackno in ESLL-PACKNO to get all the service line items
    The package No groups together all services belonging to an item in a purchasing docs and via this No the program accessses the data in individual service lines of a set of service spec.
    Hence its at item level u can find packing No provided necessary settings is maintained for service details to be captured in PO.

Maybe you are looking for