KXML Error

Hello i need some help here, i dont know what to do anymore. I'm using eclise and i'm trying to run my KXML Parser and i'm getting this error:
Running with storage root C:\Documents and Settings\daniel\j2mewtk\2.5.2\appdb\DefaultColorPhone
Running with locale: Portuguese_Brazil.1252
Running in the identified_third_party security domain
java.lang.NoClassDefFoundError: org/xmlpull/v1/XmlPullParserException
     at br.furb.furbot.mobile.MundoVisual.iniciarSequencia(+0)
     at br.furb.furbot.mobile.MundoVisual.iniciarSequencia(+6)
     at br.furb.furbot.mobile.exercicios.Teste.startApp(+37)
I added the kxml jar on build path, what should i do to resolve this problem? The problem ocours when i run as a Java ME Midlet...

SOLVED...
Step 1:
Eclipse -> "Project Properties" -> Java Build Path -> Add Jar (search .jar da KXML).
Step 2: (Important!!!)
On "build path" screen, go to the tab "_Order and Export_" , check the lib kxml2-xxxx.jar ,So now eclipse can see the .class files when Running as Middlet on the Emulator.
Ty all
Cya

Similar Messages

  • Preverification Error while using kXML with Netbeans IDE

    Hello All,
    I am using Netbeans IDE for wrting a program that parses a xml using
    kXML and display some results on screen.
    The Netbeans IDE gives the various obfuscation levels.
    The code is properly compiled at any level less than the
    highest obfuscation level. If I compile it at HIGH obfuscation level then it gives the following error-----
    Error preverifying class e
    VERIFIER ERROR e.a(Ll;)Lorg/kxml/kdom/Element;:
    Cannot find class org/kxml/kdom/Element
    D:\Netbeans_Workspace\TestObfuscation\nbproject\build-impl.xml:269: Preverification failed with error code 1.
    BUILD FAILED (total time: 4 seconds)
    How can we obfuscate the program using highest level of obfuscation.
    Thanks
    Vikas

    Thanks Peace,
    But I am facing the same problem even when I use the source java files of kXML and include those in my project and use them as additional classes to my class.
    It again builds properly when I don't use the highest obfuscation level.
    But if I try to obfuscate using Level HIGH it throws the same error.
    However when I try to run this project from J2ME Wireless Toolkit, it is running fine on the emulator.
    I guess the error is something specific to Netbeans IDE. Have anyone of you encountered such a bizzare error.
    Thanks,
    Vikas

  • Error while executing the midlet ----pleasehelp

    Hi everyone,
    I am new to webservices, I am trying to execute a webservice from a midlet. Iam getting the below error.
    java.lang.NoClassDefFoundError: org/kxmlrpc/XmlRpcClient
         at kxmlrpc_demo.commandAction(+49)
         at javax.microedition.lcdui.List.callKeyPressed(+80)
         at javax.microedition.lcdui.Display$DisplayAccessor.keyEvent(+198)
         at javax.microedition.lcdui.Display$DisplayManagerImpl.keyEvent(+11)
         at com.sun.midp.lcdui.DefaultEventHandler.keyEvent(+121)
         at com.sun.midp.lcdui.AutomatedEventHandler.keyEvent(+210)
         at com.sun.midp.lcdui.DefaultEventHandler$QueuedEventHandler.run(+178)
    Below is my midlet code.
    import javax.microedition.midlet.*;
    import javax.microedition.lcdui.*;
    import javax.microedition.io.*;
    import java.io.*;
    import java.util.*;
    import org.kxmlrpc.*;
    public class MyMidlet extends MIDlet implements CommandListener {
         private List list;
         private Command exitCommand;
         private String[] menuItems;
         private Display display;
         private Alert response;
         private XmlRpcClient xmlrpc;
         private Vector params, xmlArray;
         public MyMidlet() {
              // Initialize the User Interface
              menuItems = new String[] { "Timestamp", "Randomizer", "AddressBook" };
              list = new List("Select a service", List.IMPLICIT, menuItems, null);
              exitCommand = new Command("Exit", Command.EXIT, 1);
              response = new Alert("Service Return", null, null, AlertType.INFO);
              response.setTimeout(Alert.FOREVER);
              // Add commands
              list.addCommand(exitCommand);
              list.setCommandListener(this);
              // obtain a reference to the device's UI
              display = Display.getDisplay(this);
         }// end MyMidlet()
         public void startApp() {
              display.setCurrent(list);
         }// end startApp()
         public void pauseApp() {
         }// end pauseApp()
         public void destroyApp(boolean bool) {
              // clean up
              list = null;
              exitCommand = null;
              display = null;
         }// end destroyApp
         public void commandAction(Command com, Displayable dis) {
              if (dis == list && com == List.SELECT_COMMAND) {
                   switch (list.getSelectedIndex()) {
                   case 0:
                        try {
                             xmlrpc = new XmlRpcClient(
                                       "<a href=http:// www.wsjug.org/servlet/XmlRpcServlet EUDORA=AUTOURL> http:// www.wsjug.org/servlet/XmlRpcServlet/a>");
                             params = new Vector();
                             String serverTime = (String) xmlrpc.execute(
                                       "sysTime.getSystemTime", params);
                             response.setString(serverTime.toString());
                             display.setCurrent(response);
                        } catch (Exception ex) {
                             response.setString(ex.toString());
                             ex.printStackTrace(); // DEBUG
                             display.setCurrent(response);
                        }// end try/catch
                        break;
                   case 1:
                   case 2:
                        response.setString("Please download the full sample code");
                        display.setCurrent(response);
                        break;
                   }// end switch( list.getSelectedIndex() )
              } else if (com == exitCommand) {
                   destroyApp(true);
                   notifyDestroyed();
              }// end if( dis == list &&
              com = List.SELECT_COMMAND;
         }// end CommandAction( Command, Displayable )
    }// end MyMidlet
    I think the problem here is with the kxml.jar file which I have placed every where I find the lib folder. Could anyone please tell me where to exactly place the kxml.jar file?
    I am using Myeclipse IDE.
    Please help.
    Thanks in advance.
    Regards,
    Bharat Kumar

    Hi Vamsi.
    The exactly erro refers to a problems when you try upgrade from these version to 11.5.10.
    Can you read this note and apply solution? The note refers a patch, but the problem is the same.
    After Patch 4334965, adstrtal.sh & adstpall.sh is failing with errors [ID 360046.1]
    BR Rafael Ceolim

  • Error at the time of defining XmlParser object in J2ME......

    Hi:
    I want to use XmlParser in my J2ME application, but at the time of defining XmlParser object i a getting error is:"XmlParser cannot be resolved to a type". I am using eclipse for developing application. I have already added KXml.zip in my src folder.
    I have imported following things:
    import javax.microedition.lcdui.*;
    import javax.microedition.midlet.*;
    import java.io.*;
    import javax.microedition.io.*;
    import javax.microedition.rms.*;
    import org.kxml.*;
    import org.kxml.parser.*;
    and actual error line is:
    byte[] xmlByteArray = str.getBytes();
                                  ByteArrayInputStream xmlStream = new ByteArrayInputStream(xmlByteArray);
                                  InputStreamReader xmlReader = new InputStreamReader( xmlStream );
              //error line          XmlParser parser = new XmlParser( xmlReader );
    So, can anybody help me.
    Thank You

    Hi AnupDesai.
    I'm using [kXML 2|http://kxml.sourceforge.net/kxml2/] parser, so maybe this could help you. I'm using NetBeans 6.5 and to use it I had to add the JAR file into the "resources" of my project. Then I simply use three imports:
    import org.kxml2.io.KXmlParser;
    import org.xmlpull.v1.XmlPullParser;
    import org.xmlpull.v1.XmlPullParserException;And use it like this:
    KXmlParser parser = new KXmlParser();
    InputStreamReader reader = (open your streeam here);
    parser.setInput(reader)I hope this helps you!
    Marc

  • I am getting com.sun.kvem.ktools.ExecutionException error

    Below is the error that I get in the console while building the midlet in J2ME Wireless ToolKit 2.0
    Building "ParseXML"
    C:\WTK20\apps\ParseXML\src\ParseXMLService.java:1: illegal character: \187
    +&iuml;&raquo;&iquest;import javax.microedition.midlet.*;*+
    *^*
    C:\WTK20\apps\ParseXML\src\ParseXMLService.java:1: illegal character: \191+
    *&iuml;&raquo;&iquest;import javax.microedition.midlet.*;
    +^+
    +2 errors+
    com.sun.kvem.ktools.ExecutionException
    Build failed
    Below is the actual java code
    import javax.microedition.midlet.*;
    import javax.microedition.lcdui.*;
    import javax.microedition.io.*;
    import java.io.*;
    //kxml imports
    import org.kxml.*;
    import org.kxml.parser.*;
    public class ParseXML extends MIDlet implements CommandListener {
    private Command exitCommand; // The exit command
    private Command displayXML; // On execution, it displays title and description
    // on phone screen
    private Display display; // The display for this MIDlet
    // UI Items for display of title and description on phone screen
    private static TextBox t;
    private static String textBoxString = "";
    // XML String
    private String xmlStr = "";
    public ParseXML() {
    display = Display.getDisplay( this );
    exitCommand = new Command( "Exit", Command.EXIT, 2 );
    displayXML = new Command( "XML", Command.SCREEN, 1 );
    // The XML String in form of RSS
    StringBuffer xmlString = new StringBuffer();
    xmlString.append("<?xml version=\"1.0\"?><!DOCTYPE rss PUBLIC \"-//Netscape Communications//DTD RSS 0.91//EN\"");
    xmlString.append("\"http://my.netscape.com/publish/formats/rss-0.91.dtd\">");
    xmlString.append("<rss version=\"0.91\">");
    xmlString.append("<channel><title>Meerkat: An Open Wire Service</title>");
    xmlString.append("<link>http://meerkat.oreillynet.com</link>");
    xmlString.append("<description>Meerkat is a Web-based syndicated content reader based on RSS (\"Rich Site Summary\"). RSS is a fantastic, simple-yet-powerful syndication system rapidly gaining momentum.");
    xmlString.append("</description><language>en-us</language>");
    xmlString.append("</channel>");
    xmlString.append("</rss>");
    xmlStr = xmlString.toString();
    public void startApp() {
    // The textbox displays title and description from a RSS String
    t = new TextBox( "MIDlet XML", "kXML", 256, 0 );
    t.addCommand( exitCommand );
    t.addCommand( displayXML );
    t.setCommandListener( this );
    display.setCurrent( t );
    Pause is a no-op since there are no background activities or
    record stores that need to be closed.
    public void pauseApp() { }
    Destroy must cleanup everything not handled by the garbage collector.
    In this case there is nothing to cleanup.
    public void destroyApp(boolean unconditional) { }
    Respond to commands, including exit. On the exit command, cleanup
    and notify that the MIDlet has been destroyed.
    public void commandAction(Command c, Displayable s) {
    if ( c == exitCommand ) {
    destroyApp( false );
    notifyDestroyed();
    else if ( c == displayXML ) {
    try {
    viewXML();
    catch( Exception e ) {
    e.printStackTrace();
    // This function sets up kxml parser and calls traverse() to parse the whole XML String
    public void viewXML() throws IOException {
    try {
    byte[] xmlByteArray = xmlStr.getBytes();
    ByteArrayInputStream xmlStream = new
    ByteArrayInputStream( xmlByteArray );
    InputStreamReader xmlReader = new
    InputStreamReader( xmlStream );
    XmlParser parser = new XmlParser( xmlReader );
    try
    traverse( parser, "" );
    catch (Exception exc)
    exc.printStackTrace();
    return;
    catch ( IOException e ) {
    return ;
    } finally {
    return ;
    Traverses the XML file
    public static void traverse( XmlParser parser, String indent ) throws Exception
    boolean leave = false;
    String title = new String();
    String desc = new String();
    do {
    ParseEvent event = parser.read ();
    ParseEvent pe;
    switch ( event.getType() ) {
    // For example, <title>
    case Xml.START_TAG:
    // see API doc of StartTag for more access methods
    // Pick up Title for display
    if ("title".equals(event.getName()))
    pe = parser.read();
    title = pe.getText();
    // Pick up description for display
    if ("description".equals(event.getName()))
    pe = parser.read();
    desc = pe.getText();
    textBoxString = title + " " + desc;
    traverse( parser, "" ) ; // recursion call for each <tag></tag>
    break;
    // For example </title?
    case Xml.END_TAG:
    leave = true;
    break;
    // For example </rss>
    case Xml.END_DOCUMENT:
    leave = true;
    break;
    // For example, the text between tags
    case Xml.TEXT:
    break;
    case Xml.WHITESPACE:
    break;
    default:
    } while( !leave );
    t.setString( textBoxString );

    Below is the error that I get in the console while building the midlet in J2ME Wireless ToolKit 2.0
    Building "ParseXML"
    C:\WTK20\apps\ParseXML\src\ParseXMLService.java:1: illegal character: \187
    import javax.microedition.midlet.;
    ^
    C:\WTK20\apps\ParseXML\src\ParseXMLService.java:1: illegal character: \191
    import javax.microedition.midlet.;
    ^
    2 errors
    com.sun.kvem.ktools.ExecutionException
    Build failed
    Below is the actual java code
    import javax.microedition.midlet.;
    import javax.microedition.lcdui.;
    import javax.microedition.io.;
    import java.io.;
    //kxml imports
    import org.kxml.;
    import org.kxml.parser.;
    public class ParseXML extends MIDlet implements CommandListener {
    private Command exitCommand; // The exit command
    private Command displayXML; // On execution, it displays title and description
    // on phone screen
    private Display display; // The display for this MIDlet
    // UI Items for display of title and description on phone screen
    private static TextBox t;
    private static String textBoxString = "";
    // XML String
    private String xmlStr = "";
    public ParseXML() {
    display = Display.getDisplay( this );
    exitCommand = new Command( "Exit", Command.EXIT, 2 );
    displayXML = new Command( "XML", Command.SCREEN, 1 );
    // The XML String in form of RSS
    StringBuffer xmlString = new StringBuffer();
    xmlString.append("<?xml version=\"1.0\"?><!DOCTYPE rss PUBLIC \"-//Netscape Communications//DTD RSS 0.91//EN\"");
    xmlString.append("\"http://my.netscape.com/publish/formats/rss-0.91.dtd\">");
    xmlString.append("<rss version=\"0.91\">");
    xmlString.append("<channel><title>Meerkat: An Open Wire Service</title>");
    xmlString.append("<link>http://meerkat.oreillynet.com</link>");
    xmlString.append("<description>Meerkat is a Web-based syndicated content reader based on RSS (\"Rich Site Summary\"). RSS is a fantastic, simple-yet-powerful syndication system rapidly gaining momentum.");
    xmlString.append("</description><language>en-us</language>");
    xmlString.append("</channel>");
    xmlString.append("</rss>");
    xmlStr = xmlString.toString();
    public void startApp() {
    // The textbox displays title and description from a RSS String
    t = new TextBox( "MIDlet XML", "kXML", 256, 0 );
    t.addCommand( exitCommand );
    t.addCommand( displayXML );
    t.setCommandListener( this );
    display.setCurrent( t );
    Pause is a no-op since there are no background activities or
    record stores that need to be closed.
    public void pauseApp() { }
    Destroy must cleanup everything not handled by the garbage collector.
    In this case there is nothing to cleanup.
    public void destroyApp(boolean unconditional) { }
    Respond to commands, including exit. On the exit command, cleanup
    and notify that the MIDlet has been destroyed.
    public void commandAction(Command c, Displayable s) {
    if ( c == exitCommand ) {
    destroyApp( false );
    notifyDestroyed();
    else if ( c == displayXML ) {
    try {
    viewXML();
    catch( Exception e ) {
    e.printStackTrace();
    // This function sets up kxml parser and calls traverse() to parse the whole XML String
    public void viewXML() throws IOException {
    try {
    byte[] xmlByteArray = xmlStr.getBytes();
    ByteArrayInputStream xmlStream = new
    ByteArrayInputStream( xmlByteArray );
    InputStreamReader xmlReader = new
    InputStreamReader( xmlStream );
    XmlParser parser = new XmlParser( xmlReader );
    try
    traverse( parser, "" );
    catch (Exception exc)
    exc.printStackTrace();
    return;
    catch ( IOException e ) {
    return ;
    } finally {
    return ;
    Traverses the XML file
    public static void traverse( XmlParser parser, String indent ) throws Exception
    boolean leave = false;
    String title = new String();
    String desc = new String();
    do {
    ParseEvent event = parser.read ();
    ParseEvent pe;
    switch ( event.getType() ) {
    // For example, <title>
    case Xml.START_TAG:
    // see API doc of StartTag for more access methods
    // Pick up Title for display
    if ("title".equals(event.getName()))
    pe = parser.read();
    title = pe.getText();
    // Pick up description for display
    if ("description".equals(event.getName()))
    pe = parser.read();
    desc = pe.getText();
    textBoxString = title " " desc;
    traverse( parser, "" ) ; // recursion call for each <tag></tag>
    break;
    // For example </title?
    case Xml.END_TAG:
    leave = true;
    break;
    // For example </rss>
    case Xml.END_DOCUMENT:
    leave = true;
    break;
    // For example, the text between tags
    case Xml.TEXT:
    break;
    case Xml.WHITESPACE:
    break;
    default:
    } while( !leave );
    t.setString( textBoxString );
    }

  • Problems using kXml

    hi...
    am developing an application where i am using kxml parser.
    am using j2me wireless tool kit and palm emulator.
    while i try to compile my code in the tool kit, it gives error saying :
    c:\WTK104\apps\XMLTest\src\XMLTest.java:5: package org.kxml does not exist
    import org.kxml.*;
    ^
    am sure this problem is due to wrong placement of the package for kxml.
    i have downloaded kxml from the web and unzipped it. please tell me where to put that folder so that my application finds that .
    the import statement in my application is :
    import java.io.*;
    import java.util.*;
    import javax.microedition.lcdui.*;
    import javax.microedition.midlet.*;
    import org.kxml.*;
    import org.kxml.parser.*;
    thanks
    sanjib

    I used kXML in one of my projects in Eclipse and this is what I did to get it to work:
    Put the kXML JAR file in a folder that will not be included in the package for your project, i.e. NOT in src or lib or anything like that.
    Select your project in Eclipse and choose Configure Build Path.
    Select the Libraries tab and choose 'Add External JAR'.
    Now browse to the kXML JAR file and select it.
    This is the important part now. Now select the 'Order and Export' tab.
    You should see at least 3 entries (your project name, the J2ME Library and now kXML)
    Make sure there is a tick next to the kXML entry, this will tell Eclipse to include the files from the JAR whenever you build your project.
    Now if you select the 'Create Package' option for your project and check inside the created JAR file you should see all of the class files for kXML included in the correct paths.
    Never used anything other than Eclipse so I don't know how this translates, but if you know how to do something similar in the IDE you are using then that'll be the solution. Remember the important part of including the kXML JAR in the export otherwise it won't work.

  • How to use the kxml parser?

    I am getting problem in using the kxml parser.Actually my application is showing the java.lang.NoClassDefFoundError: org/kxml/parser/XmlParser error.
    Can you tell me how to use the kxml parser with our j2me application or what are the steps for this?
    Whether we have to use the kxml.zip or some other JAR file for this?
    Again whether we have to set any classpath for this?

    I was getting same error using kxml parser. The reason is losing interface in which constants are declared.
    You need to correct code of kxml a bit.
    In every place where constant from XmlPullParser interface is referenced only by its name (without reference to its class XmlPullParser) you need to change for use full name. it means changes like:
    START_DOCUMENT to XmlPullParser.START_DOCUMENT
    Everywhere.
    That's all!

  • Issue in parsing an XML using kxml in Creme 4.1 JVM for WIndows CE

    Hi,
    I have written a code to parse an XML using KXML.jar.
    The code will read the XML file, parse the content and writes data to a text file.
    The code is working fine in normal Windows XP enviroment.
    The same code when tested in a pocket PC is not writing the content and also not throwing any error or exception.
    Please give me some inputs on how to resove this issue.
    TIA,
    shubakarthik

    Hi,
    I have written a code to parse an XML using KXML.jar.
    The code will read the XML file, parse the content and writes data to a text file.
    The code is working fine in normal Windows XP enviroment.
    The same code when tested in a pocket PC is not writing the content and also not throwing any error or exception.
    Please give me some inputs on how to resove this issue.
    TIA,
    shubakarthik

  • Problems with kXMLParser (kXML 2)

    Hi colleagues,
    when I run my MIDlet which parses an XML file with the kXMLParser (kXML 2) I get the following exception:
    org.xmlpull.v1.XmlPullParserException: PI must not start with xml (position:unknown ���@1:7 in java.io.InputStreamReader@d590dbc)
         at org.kxml2.io.KXmlParser.exception(+47)
         at org.kxml2.io.KXmlParser.error(+42)
         at org.kxml2.io.KXmlParser.parseLegacy(+149)
         at org.kxml2.io.KXmlParser.nextImpl(+365)
         at org.kxml2.io.KXmlParser.next(+23)
         at org.kxml2.io.KXmlParser.nextTag(+4)
         at com.zesium.HelpParser.parse(+26)
         at com.zesium.HelpParser.openFile(+65)
         at com.zesium.HelpParser.run(+12)
    I don't understand what I did wrong. I serached for an explanation in the internet but I did not find anything.
    My XML file has the following structure:
    <?xml version="1.0" encoding="UTF-8" ?>
    <items>
    <item name="Funktionen">
    <paragraph>Text1</paragraph>
    </item>
    <item name="Programmbedienung">
    <paragraph>Text2</paragraph>
    <paragraph>Text3</paragraph>
    </item>
    </items>
    And my code is:
    public class HelpParser extends Thread {
    public void run() {
    openFile();
    public void openFile() {
         String helpResource = ResourceManager.getResourceString("help.file");
         InputStream in = this.getClass().getResourceAsStream("/res/"+helpResource);
         this.parse(in);
    public void parse(InputStream in) {
         // Initialize XML parser
         Reader reader = new InputStreamReader(in);
         KXmlParser kxmlParser = new KXmlParser();
         try {
              kxmlParser.setInput(reader);
              kxmlParser.nextTag();
              kxmlParser.require(XmlPullParser.START_TAG, null, "items");
              while (kxmlParser.nextTag() != XmlPullParser.END_TAG) {
                   readXMLData(kxmlParser);
              kxmlParser.require(XmlPullParser.END_TAG, null, "items");
              kxmlParser.next();
              kxmlParser.require(XmlPullParser.END_DOCUMENT, null, null);
         catch (XmlPullParserException xmlppe) {
              xmlppe.printStackTrace();
         catch (IOException ioe) {
              ioe.printStackTrace();
    private void readXMLData(KXmlParser parser) throws IOException, XmlPullParserException {
         String name = null;
         String paragraph = null;
         //Parse the element "item" in the XML file
         parser.require(XmlPullParser.START_TAG, null, "item");
         name = parser.getAttributeValue(null, "name");
         while (parser.nextTag() == XmlPullParser.START_TAG) {
              parser.require(XmlPullParser.START_TAG, null, "paragraph");
              paragraph = parser.nextText();
              parser.require(XmlPullParser.END_TAG, null, "paragraph");
         // Just for testing
         System.out.println("name: "+name);
         System.out.println("paragraph: "+paragraph);
    }     

    unlike johnson's c++ xml parser implementation, kxml is known to have problems with non-normalized xml tag patterns. kxml works like a charm with normalized structures. to solve the problem, we simply preprocess the byte stream to make it normalized -- by removing the rogue elements. however, avoid using stringbuffer in such kxml operations because it makes memory very volatile (you can see this in the sun mobility memory monitor). similar to QualComm's Brew operating system, the virtual machine does not do a stand-up job with garbage collection while using kxml. you should use GC whenever it is appropriate within the kxml parser code blocks.

  • KXML Parser

    Hi all,
    This question is for those of you who know and used the kXML parser (http://developers.sun.com/techtopics/mobility/midp/articles/parsingxml/)
    How can I use it in order to parse binary data which is stored in an XML (in the
    standard way, of course: CDATA)?
    attached is a copy of the xml file (it is an ordinary XML file, which
    contains a binary data between the tags: binaryImg).
    Thanks in advance,
    Alon<?xml version="1.0" encoding="utf-8" ?><D4UMProtocol><Session><id>551</id></Session><error><code>0</code><message></message></error><reportFeedback><msgType>1</msgType><msgTitle>it's weigh in day</msgTitle><msgContent>please step on your scale and report your weight</msgContent><binaryImg>![CDATA[PNG
    egfreefj44%%FFEdfedfefrttvsIENDB`]]</binaryImg></reportFeedback></D4UMProtocol>

    Yes, that one worked fine =) thx
    But now I have another problem (this time I add the code):
    Attribute att = null;
              String name = null;
              String address = null;
              KXmlParser parser = new KXmlParser();
              parser.setInput(is, null);
              Document document = new Document();
              document.parse(parser);
              Element root = document.getRootElement();
    int children = root.getChildCount();
         for (int i=0; i < children; i++) {
         if (root.getType(i) == Node.ELEMENT) {
         Element el = root.getElement(i);
         int babies = el.getChildCount();
         for (int j=0; j < babies; j++) {
              if (el.getType(j) == Node.ELEMENT) {
         Element elName = (Element)el.getChild(j);
         if (elName.getName().equals("name")) {
         att = elName.getAttribute("value");
         name = att.getValue();
         else if (elName.getName().equals("address")) {
         att = elName.getAttribute("value");
         address = att.getValue();
         System.out.println(name, address);
    Now I get an error msg that says that the class Attribute doesn't exist. I have looked in the api docs for the kxml parser (version 2.1.9) but I can't find anything about the Attribute class there. Should I use another class, e.g. Element, or what shall I do here? please help me =)

  • KXML and Netbeans

    Hello everyone,
    I wish to manipulate some simple XML on my J2ME application. From what i can find the best method seems to be using kXML.
    However, I am having trouble integrating this into my application as a namespace.
    Does anyone have any experience with this please?
    I am running Netbeans 5.5
    Thank You
    James

    Thanks Peace,
    But I am facing the same problem even when I use the source java files of kXML and include those in my project and use them as additional classes to my class.
    It again builds properly when I don't use the highest obfuscation level.
    But if I try to obfuscate using Level HIGH it throws the same error.
    However when I try to run this project from J2ME Wireless Toolkit, it is running fine on the emulator.
    I guess the error is something specific to Netbeans IDE. Have anyone of you encountered such a bizzare error.
    Thanks,
    Vikas

  • Writing xml file, midp, kxml - any ideas?

    Hello,
    Does any have sample code of writing an XML file with kXML or a similar tool?
    I'm getting confused with OutputWriter being abstract/DataOutputWriters not working.
    My code as follows is fairly non-existent..
    OutputStream out = "test.xml"; // this errors with incompatible type (obviously) but what needs to go here?
    XmlWriter fxml = new XmlWriter(out);
    thanks in advance
    poncenby

    OutputStream out = "test.xml"this cant work. the latter is a string and the former an OutputStream.
    yeah, thats pretty strange with the input and output of kXML. What you have to do is:
    1) write a class, that extends the java.io.OutputStream. To do this, you have to implement all abstract methods of this (afaik write(byte))
    2) this class can you pass to the XmlWriter. The most simple way of writing the bytes is to append it to a string, which you reference afterwards.
    public class MyOutputStream extends OutputStream
    public String output = "";
    public void write(int b)
      output += (char)b;
    }then write the stuff out and get the output of your OutputStream class. For writing this to a file (whichis not possible with J2ME, you have to some file handling in your OutputStream, like opening, appending and closing)
    Note: this works only, if the content consists of characters. If you want to write binary data, this will get corrupt, since the cast to char transforms this binaries to characters. The reverse is (afaik) not possible.
    hth
    Kay

  • NoClassDef kxml

    Could somebody tell me why I'm getting this error. I downloaded the kxml parser to use in the sprint wireless developer kit. I know what it means but I just can figure out how to fix it.
    Uncaught exception java/lang/NoClassDefFoundError: org/kxml/parser/XmlParser

    It may be the issues with your parsing logic..
    Could you provide your parsing code..
    Regards,
    Raja Nagendra Kumar

  • Error in starting Adobe Bridge in Photoshop CS2

    I've just installed Photoshop CS2, however upon opening Adobe Bridge this error message appears " The application has failed to start because libagluc28.dll was not found. Reinstalling to application may fix the problem"
    I have reinstalled and click repair but to no avail
    I followed Adobe Support Knowledgebase solution and run CMD and this appears:
    c:Documents and Settings/Jesus M Ferraris>
    then i entered the command
    cacls c:\windows\installer /T /E /C /G administrators:F
    but an error message appears - 'cacls' is not recognized as an internal or external command, operable program or bathc file
    I also entered the next command
    cacls "c:\documents and setting\all users" /Y /E /C /G administrators:F
    still the same error as above appears, Please help, have I miss something or was my procedure correct...
    P4, 512ram, WXP 80gHD

    Very useful.
    Good Luck.
    My
    Si
    tes

  • Windows Vista: Ipod Error Message, no longer read by PCs

    Hello,
    I have a 5th generation black ipod video with 30GB of memory.
    The other day I hooked it up to my laptop (Toshiba, 4 months old) that it's been functioning on with no problems whatsoever. This weird error message flashed twice about it not being able to sync because of some software problem.
    Eversince then, the only thing I can charge my ipod on is the family treadmill in the basement (~_~) as no other computer in the house recognizes it. I can't even charge it through the wall sockets, either.
    I have changed the ipod cord, still no luck. I've also reset the device about 3 or 4 times and uninstalled, restarted the laptop then reinstalled itunes. I would like to reset it back to factory settings but that's impossible as computers/laptops don't pick it up. I live very far from a Mac store...
    What's a girl to do? I can't live without my Busta Rhymes and Wu-Tang Clan!
    Any advice would be greatly appreciated! Thanks!

    you have to update Vista go to this site and up-date http://windowsupdate.microsoft.com

Maybe you are looking for

  • Upgrade from AMD 64 to AMD X2 64

    Hello : I think to upgrade from AMD Athlon 64 3200+ to AMD Athlon 64 X2 3800+ (Dual Core), but i don't know if my motherboard support it. Motherboard : MSI K8N Neo4 Platinum Edition (MS-7125)                     06/23/2005-MS-7125-6A61FM49C-00 PCB :

  • Where can I find a tutorial for the Canon Pixma MG6220

    I am unable to make full use of the Canon Pixme MG6220 I purchased a few weeks ago. I am an 85 year old geezer and my old printer was pretty straight forward but had limited features whereas this Pixma 6220 is a great machine but I find it most intim

  • Help installing AMD Radeon 8490 graphic card on HP Pavilion P7-1110

    Appreciate any help on this that anyone can give.  I'm at a loss at the moment.  Just got an AMD Radeon 8490 graphics card to put into the HP Pavilion p7-1110 desktop.  I have not opened up the back of a computer for probably ten years (used to do it

  • Lion Server Can it manage file vaule

    Just wondering, can Lion Server manage client mac's file vault, so that as a corporate admin, could I centrally manage file vault for mac's in my environment?

  • Creation d'une base de données

    Bonjour, Dans le cadre de mon projet qui est un banc de test, je souhaiterais  créer une base de données danslaquelle je peux stoker les différents références des produits que je vais tester  et leurs associer les tests correspondants.  Cela peut par