problem on xml parsing

Hello.

I work with bb jde 4.6.

I have the webservice and I want the value of city from this link.

I tried, but it's not getting any value, my code and link is as below:

Code:

main class extends screen
{
public int i;
       
public String title;
public main()
{
        
define later used for parsing variables
Doc document;
StreamConnection conn;
try {}
System.out.println ("Hello 1");
Conn = (StreamConnection) Connector.open ("http://vaikunth.kwetoo.com/mobile/getCSZ.php?csz=rokville, md;") deviceside = true");"
System.out.println("coonection:"+conn);
DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance ();
DocumentBuilder docBuilder = docBuilderFactory.newDocumentBuilder ();
System.out.println ("Hello 2");
docBuilder.isValidating ();
System.out.println ("HEL");
doc = docBuilder.parse (conn.openInputStream ());
System.out.println ("HE");
doc.getDocumentElement () .normalize ();
System.out.println ("hello 3");
List of NodeList = doc.getElementsByTagName ("city");
Element titleElem = (Element) list.item (0);
System.out.println ("Hello 4");
NodeList titleNode2 = titleElem.getChildNodes ();
title = ((Node) titleNode2.item (0)) .getNodeValue ();
System.out.println ("title");
                  
                        
                
} //end try
                
            
catch (Exception e) {}
}
}
}

Please help me as soon as possible.

Thanks for the reply.

But I solved the problem myself using json.

Tags: BlackBerry Developers

Similar Questions

  • Problem Oracle Datamodeler Script Rhino "oracle.xml.parser.v2.XMLParseException.

    Hello:

    Today, I have an unusual problem for me.

    In my relational model, I executed a sript easy rhino (only modify the properties, maxVolume,... leave an excel). At the time when I run the script don't have a problem. Then, I recorded the changes and close the template. Later, I opened the model once more and the model is completely crushed. All the columns in the tables are gone and the name of the tables, sometimes, change to TABLE_Number. This causes errors (for example) when you open a model:

    Oracle.Xml.Parser.v2.XMLParseException; lineNumber: 23; columnNumber: 2; ' < ' may not appear in the value of the attribute.

    Someone knows what is the problem or possible problem?

    Thank you.

    If you delete the table, you don't need to use setDirty (true). That method simply pass the flag this object has changed. If you delete the object there is another treatment.

    Probably, I can guess more if you post line 23 of the problematic file

    Philippe

  • The XML parsing problems

    I started with the sample of XML parsing and tried to get a simple user interface that loads buttons with the value of a child node (more later to go to a new screen and analyze another XML code).  When I analyze the XML code, I get the knots, but I don't get the values.  My example of XML is generated.

    Example of XML data:

    
    
    
    
             Bugs     BugsXML.action 
    
    
    

    Code:

    import java.io.InputStream;
    
    import org.w3c.dom.Document;
    import org.w3c.dom.Node;
    import org.w3c.dom.NodeList;
    
    import mbt.util.DataUtils;
    import net.rim.device.api.system.Application;
    import net.rim.device.api.ui.UiApplication;
    import net.rim.device.api.ui.component.ButtonField;
    import net.rim.device.api.ui.component.RichTextField;
    import net.rim.device.api.ui.component.SeparatorField;
    import net.rim.device.api.ui.container.MainScreen;
    import net.rim.device.api.xml.parsers.DocumentBuilder;
    import net.rim.device.api.xml.parsers.DocumentBuilderFactory;
    
    public class XMLViewer extends UiApplication {
    
      MainScreen _screen = new MainScreen();
      public static final boolean isTest = true;
      ConnectionThread _conThread;
      public final String xmlUrl;
    
      public static void main(String args[]) {
        XMLViewer viewer = new XMLViewer();
        viewer.enterEventDispatcher();
      }
    
      public XMLViewer() {
        this.xmlUrl = "http://localhost:8080/FooXML.action";
        this._screen.setTitle("XML Viewer");
        this._screen.add(new RichTextField("Requesting update..."));
        this._screen.add(new SeparatorField());
        pushScreen(this._screen);
        this._conThread = new ConnectionThread();
        this._conThread.start();
      }
    
      public void updateField(String name, String action) {
        synchronized (Application.getEventLock()) {
          ButtonField button = new ButtonField(name,
            ButtonField.CONSUME_CLICK | ButtonField.FOCUSABLE |
            ButtonField.USE_ALL_WIDTH){
              protected boolean navigationClick(int status, int time) {
                System.out.println("Name: " + this.getLabel());
                return true;
              }
          };
          this._screen.add(button);
        }
      }
    
      private class ConnectionThread extends Thread {
        public ConnectionThread() {
          super();
        }
        public void run() {
          Document doc;
          try {
            int i,j;
            DocumentBuilderFactory docFactory =           DocumentBuilderFactory.newInstance();
            DocumentBuilder docBuilder = docFactory.newDocumentBuilder();
            InputStream is = DataUtils.getXMLActions(xmlUrl);
            if (is == null) {
              System.out.println("InputStream is null!");
              return;
            }
            doc = docBuilder.parse(is);
            doc.getDocumentElement().normalize();
            NodeList list = doc.getElementsByTagName("action");
            for (i=0;i
    

    I get this result:

    HTTP STATUS OKItem: 1 has name: name has text: null has value: nullItem: 3 has name: url has text: null has value: null
    

    You can see this link, it may be useful for you

    http://supportforums.BlackBerry.com/T5/Java-development/help-with-parsing-XML-XMLParseDemo-Java/TD-p...

  • XML Parsing Error: unexpected scanner place State: jar:file:///C:/Program%20Files%20 (x 86) /Mozilla%20Firefox/browser/omni.ja!/chrome/browser/content/browser/ab

    Madam/Sir,

    I log on this site everyday to make a contribution (http://theanimalrescuesite.greatergood.com/clickToGive/home.faces?siteId=3) and during the last three days, I was unable to connect. Today, I get this message: XML parsing error: State unexpected location parser: jar:file:///C:/Program%20Files%20 (x 86) /Mozilla%20Firefox/browser/omni.ja!/chrome/browser/content/browser/abt

    Best regards

    Peter

    What Firefox locale (UI language) do you use?

    Try a clean reinstall and delete the program folder before Firefox to (re) install a new copy of the current version of Firefox.

    If possible to uninstall your current version of Firefox to clean the Windows registry and settings in the security software.

    • Do NOT remove the "personal data" when you uninstall your current version of Firefox, because this will remove all profile folders and you lose personal data such as bookmarks and passwords including data profiles created by other versions of Firefox.

    Delete the program folder Firefox before installing newly downloaded copy of the Firefox installer.

    • (32-bit Windows) "C:\Program Files\Mozilla Firefox\"
    • (Windows 64 bit) "C:\Program Files (x 86) \Mozilla.

    Your bookmarks and other personal data are stored in the Firefox profile folder and will not be affected by a uninstall and (re) install, but do NOT delete personal data when you uninstall Firefox which removes all Firefox profile folders and you lose your data.

  • Error after installing FF34 on FF33: XML Parsing Error: undefined entity WebIDE

    Hello
    After installing FF34 on FF33 I get a window with this message when I close windows firefox closes too:

    XML parsing error: undefined entity
    Location: chrome://browser/content/browser.xul
    Line number 320, column 5: key < = "" command = "tools: WebIDE ' id = 'key_webide' keycode =" & amp; webide.keycode; "p =" ">."
    < / key >

    ^

    What Firefox locale (UI language) do you use?

    Start Firefox in Safe Mode to check if one of the extensions (Firefox/tools > Modules > Extensions) or if hardware acceleration is the cause of the problem.

    • Put yourself in the DEFAULT theme: Firefox/tools > Modules > appearance
    • Do NOT click on the reset button on the startup window Mode safe
  • Cannot add a new account to FireFTP. Get &gt; &gt; &gt; XML Parsing Error: undefined entity location: chrome://fireftp/content/accountManager.xul line number 216, column 17:

    I can't add an additional account to FireFTP. I get a yellow box with this title:

    XML parsing error: undefined entity
    Location: chrome://fireftp/content/accountManager.xul
    216, column 17 line number:
    < label of the menu = "" & charsetMenuMore1.label; "accesskey =" & charsetMenuMore1.accesskey; "datasources ="rdf:charset - menu"ref ="NC:BrowserMore1CharsetMenuRoot">

    ^

    Do not understand the problem, can anyone help please?

    Try the FireFTP update to the 2.0.20 latest version.
    An update for Firefox 32 compatibility.
    https://addons.Mozilla.org/en-us/Firefox/addon/FireFTP/

  • I tried to view my tabs on other computers and received this message: XML Parsing Error: undefined entity location: on: sync-tabs line number 7, column 1: the window id = "tabs-display" ^ How can I fix?

    "Error message has been: XML Parsing Error: undefined entity location: on: sync-tabs line number 7, column 1: window (weeks =" "3 =" "4 =" "5 =" "7 =" "< =" "^ =" "a =" "Add - on. =" "it y =" ' am = "" a = "" and = "" are = "" avg = "" believe = "" time = "" but = "" impossible = "" some = "" computers = "" firefox = "" for = "" I = "" I = "" id = 'tabs-view' in = "" installed.. = "" it = "" months) = "" = "" on. "" "" "" "" = "" or = "" other = "" p = "" paid = "" remember = "" running = "" sometimes = "" sync = "" tabs = "" version = "" look a = "" was = "" we = "" some = "" when = "" windows = "" worked = "" > < / window > "

    Hello!

    Can you give us some details? When this message display? Is in your phone or your computer? What is your language? More information you can give us the best.

    You use the add-on and Firefox 4? If so, I'll ask you to disable and remove the add-on: Sync is now part of the Firefox browser and you don't need the add-on. [https://bugzilla.mozilla.org/show_bug.cgi?id=644894 some users solved this problem by uninstalling the add-on.]
    ]

  • Speed Dial gives me an XML parsing error: no element found

    Have set up the Speed Dial and also set it as homepage. But when I then open Firefox, speed dial does not work and I get:
    XML Parsing Error: no element found
    Have retried reloading Speed Dial twice, and this happens every time. I am running Firefox 3.6.16.

    There is an extension conflict. See this article: blog of Speed Dial on this problem article

  • in the bar of persona, I get a msg with XML Parsing Error start: can a very long message. FireFox 3.6.13

    XML Parsing Error: not blocked cavities symbolic location: chrome://brower/content/brower.xul line number 1, column 13546: TOOLBAR > < COMMANDS >

    If you have installed, disable a toolbar for Amazon, until an updated version is available. In addition, you can disable the toolbar, as it is at the origin of the problems for many users not being able to open new tabs.

  • XControls, XProblems, of XML parsing

    I use a motor of Action (functional overall) to keep a reference to a DOM Document, with several States to manipulate the document.  I call the engine action XControls on Init and Uninit VI, so that there are XML elements that are added/removed by the engine of the action when the XControl is added or deleted a VI.  I am able to add many copies of the XControl without problems.  Often I can go on adding and removing XControls several times.  Randomly, however, I get a 15 warning associated with the XML parser, indicating that the Document DOM resource is not valid.  From this moment, I'm more able to make changes to the document - I can view the XML associated with the DOM using XML Document to get, but am not able to manipulate it in any way.  It is as if the object or reference has corrupted.

    Y at - it a known bug related to this?  If I run the motor of action independent of the XControl I don't get this problem.  XControls tend to corrupt the references in external screw for the XControl?

    I'm using LabVIEW 8.6.  Thanks for any help.

    LaRisa,.

    It turns out that it is not necessarily a bug.  The problem arises from the way LabVIEW automatically cleans references for the screws that are no longer active.  I called the overall functioning of the XControls in the Init and Uninit capacity live after the creation and deletion of multiple copies of one the XControl on my front, LabVIEW must have decided that I used is no longer the global functional and empty its references VI.

    To resolve this problem, I now initialize the functional overall in a hidden 'main' VI which runs as long as I have any XControls on the front panel.  The case put the functional overall in a calling tree remains active rather than one that is more sporadic, such as the call XControl VI tree.

    I can understand why there was a problem, given the unusual delivery XControls.

    Thanks for following, I hope this helps others when generating XControls - they are really not so bad once you get used to their strange behavior.

  • XML parsing error. no evidence that that is line 1 during the installation of the audio bible Download Manager

    I try to install the Download Manager audio bible, when this error screen appears.

    XML parsing error. any element that is on line 1

    Hello

    1 did you change on your computer before this problem?

    2. what operating system is installed on your computer?

    What version of the operating system Windows am I running?

    http://Windows.Microsoft.com/en-us/Windows7/help/which-version-of-the-Windows-operating-system-am-i-running

    3. are you using Internet Explorer? If Yes, what version of IE are you using?

    Find out what version of Internet Explorer you are using
    http://Windows.Microsoft.com/en-us/Windows7/find-out-which-version-of-Internet-Explorer-youre-using

    I would say download you the application and install it again and then check.

  • XML parser - display order

    Hello

    I have a program that does the following:

    1 contact the http server and executes a query on a mysql database.

    2 Php script generates an xml file

    3. XML file is downloaded on the BlackBerry.

    Steps one and two work perfectly well - no problem there.  When the XML is generated on the server, entries are sorted in ascending order according to the unique primary key assigned to each record (an integer).  I downloaded the XML file on the server and it has inspected and everything is in order.

    The problem is the following:

    When the XML file is downloaded on the BB and the contents of the XML file displayed on the BB, the information that is displayed is not in order according to the unique primary key assigned to each growing record.  Indeed, the information is displayed in what appears to be a way almost no organized.  (I say "almost no organized", as it doesn't seem to be a discernible patter, but I have not yet studied to confirm if this is indeed the case.)

    The XML parser works like this:

    1. downloaded XML file

    2. the information is extracted from the file by using a loop.

    3. in the course of each loop cycle, a channel is created and this string is then inserted in an EditField.

    4. a new EditField is instantiated for each record.

    I don't know if I am missing something on the side of analysis of XML.  Any ideas?  All the world was faced with a similar problem?

    One of my friends from specialist tech understood the problem.

    I wrongly assumed that a mySQL query has been resolved.  I'll have to add a suffix "El TRI" to my query mySQL in my PHP script.

    Problem solved.

  • XML parser

    Hello world

    Sorry for my English and thanks to all who read this message.
    I am new to the development of the playbook, I search in the api playbook, but I have not found the answer to my problem.
    Is there a category for the xml parser?

    Thank you for the future response and your help.

    XML is very easy.

    var myxmlstring: String = "Blue';"

    var xml: XML = new XML (myxmlstring);

    From there, you can access such tags (in the example above)

    var value: String = xml.tag;

    var color: String = xml.line@color;

    etc.

    There is good documentation on the XML class.

  • XML Parser for BlackBerry 5.0

    Hi all! I am new to the world of BlackBerry development! I am looking for a XML parser. I used kXML in other devices (not ripe) and I had no problem. But with BlackBerry my application never starts. The Simulator says: "error of JVM 104. Search for this error, I saw that it takes place only in the Simulator, but when I install the software in the device, the application start. Anyone can help me?

    for xml parsing you can leverage the following packages:
    * javax.xml.parsers
    * net.rim.device.api.xml.parsers

  • XML parsing failed because «»

    Hello

    I am facing problem for composite construction in jdeveloper. It shows error below. Please suggest how to proceed further.

    • Error: XML parsing failed because «»

    BuildFile: C:\Oracle\Middleware\jdeveloper\bin\ant-sca-compile.xml

    SCAC:

    [scac] Validation of the composites 'C:\MR96\BPEL Services\MOOA_businesservices\AddComponent\composite.xml'

    [scac] If option BPELC "classpath" C:\Oracle\Middleware\modules\com.oracle.toplink_1.0.0.0_11-1-1-5-0.jar; C:\Oracle\Middleware\modules\org. Eclipse.persistence_1.1.0.0_2 - 1.jar; C:\Oracle\Middleware\modules\com.BEA.core.ANTLR.runtime_2.7.7.jar; C:\Oracle\Middleware\modules\javax.persistence_1.0.0.0_2-0-0.jar; C:\Oracle\Middleware\oracle_common\modules\oracle.xdk_11.1.0\xmlparserv2.jar; C:\Oracle\Middleware\oracle_common\modules\oracle.xdk_11.1.0\xml.jar; C:\Oracle\Middleware\jdeveloper\jdev\extensions\oracle. SCA.modeler.jar; C:\Oracle\Middleware\jdeveloper\soa\modules\oracle. SOA.fabric_11.1.1\fabric-Runtime.jar; C:\Oracle\Middleware\jdeveloper\soa\modules\oracle. SOA.mgmt_11.1.1\soa-infra-Mgmt.jar; C:\Oracle\Middleware\oracle_common\modules\oracle.fabriccommon_11.1.1\fabric-common.jar; C:\Oracle\Middleware\jdeveloper\soa\modules\oracle. SOA.bpel_11.1.1\orabpel.jar; C:\Oracle\Middleware\jdeveloper\soa\modules\oracle. SOA.mediator_11.1.1\mediator_client.jar; C:\Oracle\Middleware\oracle_common\modules\oracle.mds_11.1.1\mdsrt.jar; C:\MR96\BPEL Services\MOOA_businesservices\AddComponent\SCA-INF\classes

    [scac] java.lang.NullPointerException

    [scac] to com.collaxa.cube.lang.compiler.map.bpel.BPELProcess.lookupInitiationInfo(BPELProcess.java:1010)

    [scac] to com.collaxa.cube.lang.compiler.map.bpel.BPELProcess.addOnMessage(BPELProcess.java:903)

    [scac] to com.collaxa.cube.lang.compiler.bpel.BpelParser.parseOnMessage(BpelParser.java:1597)

    [scac] to com.collaxa.cube.lang.compiler.bpel.BpelParser.startElement(BpelParser.java:587)

    [scac] to com.collaxa.cube.lang.compiler.bpel.BpelParser.parseElement(BpelParser.java:492)

    [scac] to com.collaxa.cube.lang.compiler.bpel.BpelParser.parseElement(BpelParser.java:499)

    [scac] to com.collaxa.cube.lang.compiler.bpel.BpelParser.parseElement(BpelParser.java:499)

    [scac] to com.collaxa.cube.lang.compiler.bpel.BpelParser.parseElement(BpelParser.java:499)

    [scac] to com.collaxa.cube.lang.compiler.bpel.BpelParser.parseElement(BpelParser.java:499)

    [scac] to com.collaxa.cube.lang.compiler.bpel.BpelParser.parseElement(BpelParser.java:499)

    [scac] to com.collaxa.cube.lang.compiler.bpel.BpelParser.parseElement(BpelParser.java:499)

    [scac] to com.collaxa.cube.lang.compiler.bpel.BpelParser.parseElement(BpelParser.java:499)

    [scac] to com.collaxa.cube.lang.compiler.bpel.BpelParser.parseElement(BpelParser.java:499)

    [scac] to com.collaxa.cube.lang.compiler.bpel.BpelParser.parseElement(BpelParser.java:499)

    [scac] to com.collaxa.cube.lang.compiler.bpel.BpelParser.parseElement(BpelParser.java:499)

    [scac] to com.collaxa.cube.lang.compiler.bpel.BpelParser.parseElement(BpelParser.java:499)

    [scac] to com.collaxa.cube.lang.compiler.bpel.BpelParser.parseElement(BpelParser.java:499)

    [scac] to com.collaxa.cube.lang.compiler.bpel.BpelParser.parseElement(BpelParser.java:499)

    [scac] to com.collaxa.cube.lang.compiler.bpel.BpelParser.parseElement(BpelParser.java:499)

    [scac] to com.collaxa.cube.lang.compiler.bpel.BpelParser.parseElement(BpelParser.java:499)

    [scac] to com.collaxa.cube.lang.compiler.bpel.BpelParser.parseElement(BpelParser.java:499)

    [scac] to com.collaxa.cube.lang.compiler.bpel.BpelParser.parseElement(BpelParser.java:499)

    [scac] to com.collaxa.cube.lang.compiler.bpel.BpelParser.parse(BpelParser.java:455)

    [scac] to com.collaxa.cube.lang.compiler.bpel.BpelParser.parse(BpelParser.java:402)

    [scac] to com.collaxa.cube.lang.compiler.bpel.BPELValidator.validate(BPELValidator.java:65)

    [scac] to com.collaxa.cube.lang.compiler.BPEL1Processor.validate(BPEL1Processor.java:329)

    [scac] to com.collaxa.cube.lang.compiler.BPEL1Processor.process(BPEL1Processor.java:153)

    [scac] to com.collaxa.cube.lang.compiler.CubeParserHelper.compile(CubeParserHelper.java:47)

    [scac] to oracle.fabric.bpel.bpelc.BPELComponentValidator.validate(BPELComponentValidator.java:40)

    [scac] to oracle.soa.scac.ValidateComposite.validateComponentTypeServicesReferences(ValidateComposite.java:1051)

    [scac] to oracle.soa.scac.ValidateComposite.doValidation0(ValidateComposite.java:502)

    [scac] to oracle.soa.scac.ValidateComposite.doValidation(ValidateComposite.java:481)

    [scac] to oracle.soa.scac.ValidateComposite.run0(ValidateComposite.java:206)

    [scac] to oracle.soa.scac.ValidateComposite.run(ValidateComposite.java:187)

    [scac] to oracle.soa.scac.ValidateComposite.main(ValidateComposite.java:179)

    [scac] AddComponentProcess.bpel: error: XML parsing failed because «»

    BUILD FAILED

    C:\Oracle\Middleware\jdeveloper\bin\ant-SCA-compile.XML:278: Java returned: 1 check log file: C:\MR96\BPEL Services\MOOA_businesservices\AddComponent\SCA-INF\classes\scac.log to find errors

    Total time: 1 minute 27 seconds

    Thank you

    are getting you error when compiling or during the deployment?

    What version of Soa server are you?

    Also are you trying to deploy developer J, if yes, what is the version of Jdev?

    Also, you can try deployment ant script or directly from EM?

    are there multipurpose ws.binding items in composite.xml?

Maybe you are looking for

  • HP Pavilion slimline: need for instructions on how to put wifi address and password.

    Need instructions on how to put wifi address and password to secure the wifi connection.  Please notify.

  • Partition recovery & system NB250-108

    Hello!How can I recover/reinstall the SYSTEM (e) partition on my NB250-108 because I did something stupid and messed up my SYSTEM partition (E :) so that no software resides in this score now. The information I want is what should be the Partition si

  • Is there a form/technique of Toshiba email address?

    I realize this is probably not the best place, but to research throughout the section of the support (before the forum) I don't see one anywhere. It's another to raise a warranty claim which is on the top. Only, I have a quick question for the custom

  • R7000 VPN

    I searched for a few weeks. I'm frustrated so I hope someone can answer this for me once and for all. If I run a VPN (OpenVpn) with the R7000 - what kind of speeds should I get? Don't 25Mbps down sound normal max? Thank you.

  • Matshita DVD RAM UJ850s ATA optical drive will not read burned media, running Vista

    * original title - CD/DVD unit read not "burned" cd *. Hi, there are about 6 weeks, I had to do a recovery because a virus in my PC, the problem is that now the optical unit reads no CD, it reads 'original' CD, DVD (original and burned) but not burne