Get some of the XML

Hello friends

I had a chunk of XML. I need to get some of the XML for that. for Ex

123456789

I need to write a method that I can pass a node (Ex: author), can I get a new XML that has

part of the XML like this

123456789

How to do this? Help, please

I wrote a method to do a string search and it worked. the method is given below.

public String getSubString(String fullString,String firstString,String endString)
    {
            String newString="";
            try
            {
                        int startIndex=fullString.indexOf(firstString);
                        newString=fullString.substring(startIndex);
                        int endIndex=newString.indexOf(endString,startIndex+firstString.length());
                        newString=newString.substring(0,endIndex+endString.length());
                }
                catch (Exception e)
                {
                        ExceptionHandler.handle("Error "+e.toString());
                }
                return newString;
    }

Now you can call the method

getSubString(xmlString,"","");

Tags: BlackBerry Developers

Similar Questions

  • Some fields in a form doesn't get presented with the XML - is - it a setting to toggle it?

    I wouldn't consider myself to be an expert with Acrobat or LCD, but I am pretty familiar with PDF forms and have created some...

    I edited recently a former, and now some fields don't get included in the XML which can be emailed...

    Is there a setting somewhere that active / disabled individual to be included or excluded from the XML fields?

    Is there anything else I should look at? I tried to change the name to make them all unique, but still no joy...

    Have you checked the settings on the tab object-binding data binding?

  • How to get some of the styles applied using script?

    Hi all

    I need to know how to get some styles applied using scripts ID. I don't have a lot of experience in InDesign so need help.

    Here is a screenshot with sample text with styles of such applied and highlighted.

    screenshot.png

    I need to know what the texts in my document have these styles applied as all caps, Baker pointed out, Subscript and Superscript, etc..

    Help, please.

    Thank you!

    Get in shape and make the selection, then run the script

    Examine the file for the properties you want.

    Pretty easy

  • The best way to get some of the software components / applications

    Initall put in place and installation of the software, it was a request of (now I don't remember exactly the name) for printing cards. I've been recently some difficutlties techniques and my drivers ect... had to be uninstalled and reinstalled several times, by a technician supervisor. After everything was done, we found the problem to be just a bad card memory. Anyway, by the foregoing, I lost this photo card application, I now need to. SO my question is how can I get that back? I put the software supplied with the printer in the hope that I was able to preform a download custom or advanced, but I do not get this option, infact, I can't even find this application.  Could someone help me please?  Oh I'm sorry this is an officejet all-in-one 8600 911 pro /operating system is window Vista 64 bit Edition / home premium

    Hello eshewobfuscatio,

    I think you are looking for Photo Creations.
    You can download it from the following link.

    http://www.HP.com/global/us/en/consumer/digital_photography/free/software/photo-creations.html

    I would like to know how it works for you.

  • How to get some of the files, but not all of them in a query

    Hi I have a query that returns events that do not have the mrreceived as 'Y '. I'm trying to find a way how we can rewrite the query which gives the events without mrreceived as "Y" or mrreceived as null but events both on the handset? "

    {code}

    Select c.client_id,
    e.event_id,
    e.mrreceived,
    e.event_status_code,
    e.proj_batch_id,
    p.ProviderName,
    p.clientproviderid
    the event e, customer c, slip p
    where e.client_id = c.client_id
    and e.clientproviderid = p.clientproviderid
    and c.client_id = 1250
    and p.clientproviderid not in
    (select distinct sliding b.clientproviderid b, event x
    where b.clientproviderid = p.clientproviderid
    and b.clientproviderid = x.clientproviderid
    and x.mrreceived = 'Y '.
    and e.client_id = 1250)


    {code}

    user11961230 wrote:

    I just want to see the id 10371.

    Ok. If you want to see id with both Y and NULL, right? If so:

    select c.client_id,
           e.event_id,
           e.mrreceived,
           e.event_status_code,
           e.proj_batch_id,
           p.providername,
           p.clientproviderid
    from   event e, client c, clientprovider p
    where  e.client_id = c.client_id
    and    e.clientproviderid = p.clientproviderid
    and    c.client_id = 1250
    and    p.clientproviderid in
           (select b.clientproviderid  from clientprovider b, event x
             where  b.clientproviderid = p.clientproviderid
             and    b.clientproviderid = x.clientproviderid
             and    (x.mrreceived = 'Y' or x.mrreceived IS NULL)
             and    e.client_id = 1250
             group by b.clientproviderid
             having count(distinct nvl(x.mrreceived,'X')) = 2
           )
    /
    

    SY.

  • Catch / know the XML data in the form of PDF (without doing send XML)

    It is possible from a PDF form using get JS / know the XML data in the current form?

    I need to get the same XML data that would be generated with the "export data" function to Adobe Professional.

    THX!

    OK now I get... You can use the command:

    xfa.datasets.data.saveXML ("pretty")

    Paul

  • NULL values for some elements of the XML reading tree

    I am confirming that I interpret correctly all the elements of a custom data XML structure defined by my application (the schema is completely under my control).  Some of the elements in my XML tree are read as NULL values, even if similar items are readind as expected.  I have checked some obvious things like misspelling the names of keys, but have not yet find the problem.  Anyone who has debugged similar questions - what else could cause this?

    Example XML:

    
        1.0.0.0
        1000
        MyAppsName
        
            
                1000
                userDefined
                StructName
            
        
    
    

    And extracted C++ w/comments at the end of each line about what I see (DataManager is my class of CRUD operations):

    In DataManager.hpp:

    QVariant mCustomDataStructsTopLevel;
    QVariantMap mCustomDataStructsTopLevelMap;
    

    In DataManager.cpp:

    mCustomDataStructsTopLevel = mXda.load(Utils::dataFilePath(customDataStructsFileName));  // XmlDataAccess; verified loading w/no errors
    mCustomDataStructsTopLevelMap = mCustomDataStructsTopLevel.toMap();
    
    qDebug() << "appName element value: " << mCustomDataStructsTopLevelMap["appName"]; // Outputs "MyAppsName" as expected
    qDebug() << "lastId element value: " << mCustomDataStructsTopLevelMap["lastId"]; // Outputs null (specifically: QVariant(, ) ) - this is NOT expected
    qDebug() << "appVersion element value: " << mCustomDataStructsTopLevelMap["appVersion"]; // Outputs null (specifically: QVariant(QString, "") )  - this is NOT expected
    

    OK, I got the feeling (and actually hoped) it was a silly mistake of face-palm on my part (compared to a problem of BB10 who had little chance of getting fixed).

    The problem is that I copy the structure of custom data from Starter to my Active dir to my data directory to first install but do not crush him on subsequent launches, as the copy in the data directory is what the user changes and relies on.  I was not a delete and reinstall on each of my iterations, so I wasn't really loading the modified versions of my XML I wanted--just, I was getting a day old stale version which was actually for the items I didn't expect NULL values for nulls.  DOH!

  • How to get the XML from the Request of Java object before sending. SOAP Web services

    I'm building Java request to Online Web Services and we'll call it application A . I got the WSDL forms the second part of the file in order to communicate with their application and we'll call it application B .

    Of the WSDL file generate the Java required classes that are Requests and Responses . classes Application A will send some request object after setting the parameters required and with the exception of response object of application B .

    The connection is established and the two applications A and B communicate with each other.

    Question:

    Of application A How can I get the xml data (or text file) for the request object before sending it to application B ?

    As described the connection is passing Java object such as request and I know that in some point this request will be converted to xml file. How to get it?

    -EDIT-

    Missing important information which can be confusing.

    I'm generated the Java rating were generated using the Axis framework

    The problem is solved by, add the following statements in the bindingStub class that was automatically generated from the WSDL file to the web-services you are trying to access.

       String request = _call.getMessageContext().getRequestMessage().getSOAPPartAsString(); 
     String response = _call.getMessageContext().getResponseMessage().getSOAPPartAsString();
    

    These statements should be placed after the following method call _call.invoke otherwise you will get NullPointerException .

    _callis a variable of type org.apache.axis.client.Cal and it is automatically generated byAxis

  • Download the file and get the XML response

    Hello
    When you download a file by using the method of the FileReference download, is there a way to retrieve information from the server other than the event "full." I need more information other than complete without HTTP error.

    For example, I download a zip file, do some processing on the zip file (check some information in the zip file), then I want to send some XML to the applicant actionscript... as Manager 'result' of HTTPService. Is this possible?

    : server script name:
    get Filedata (zip file) of the mission
    write Filedata to disk
    do things to zip the contents of the file
    spit XML (the XML would be consumed by actionscript)

    I was not able to find a way to do it using FileReference.

    Well, I'm a fool the answer was there in the docs...

    The FileReference object will be sending an uploadCompleteData event you can listen, and when it fires use the property data to extract the server response

    ...
    _fileRef.addEventListener (DataEvent.UPLOAD_COMPLETE_DATA, onUploadCompleteData);

    var mUploadURLRequest:URLRequest = new URLRequest (_uploadURL);

    _fileRef.upload (mUploadURLRequest);

    private void onUploadCompleteData (e: DataEvent): void
    {
    var data: Object = e.data;
    trace (ObjectUtil.toString (data));
    }

  • I have currently 2 Email addresses with Mozella, I am wanting to get rid of one, but I want to keep some of the emails to the email address. How can I keep t

    I currently have 2 Email addresses with Mozella, but I am wanting to get rid of one as my main one, but I want to keep some of the emails to that Email address.
    How can I keep these emails but still not got rid of the email address and does not lose the one I want to keep?

    I currently have 2 Email addresses with Mozella

    Or, you have an e-mail with "Mozella" or Mozilla. Mozilla is not an e-mail provider.
    You do not have an account with your e-mail provider, and you access this account via Mozilla Thunderbird.

    How can I keep these emails but still not got rid of the email address and does not lose the one I want to keep?

    Move all the messages you want to keep your local folders account. You can create subfolders under "Local folders" to replicate a folder hierarchy, you can have for the account to be deleted.

    Manually create folders, do not try to move entire folders.
    Then copy the messages in a folder at a time.
    Do this by selecting the messages can be completely copied to the source folder. Then a selected message - copy, right-click and choose the destination folder.
    Once the messages have been copied successfully, you can delete them in the source folder.
    Once all messages to be kept have been copied to local folders, safely, you can delete the account.

  • trying to browse some of the sites locally that we get the following error: HTTP error 500.19 - Internal Server Error

    HTTP 500.19 - internal error in the server error

    Hello

    We have Windows 2008 R2 Server, 64-Bit

    IIS version: 7.5.7600.16385

    We had several Web sites for our clients on this IIS server.

    While some of the hosted site work properly, but when you try to browse some of the sites locally, we get the following error:

    HTTP 500.19 error - internal error the requested page server is inaccessible because the configuration data of the page are not valid.

    Hello SGTPrasad

    You can find the Server forums on TechNet support, please create a new post at the following link:

    http://social.technet.Microsoft.com/forums/en/category/WindowsServer/

  • I have an old computer use more, but I need to get some documents, but I don't remember the username to connect to windows

    I have an old computer use more, but I need to get some documents but I don't remember the username to connect to windows and there is no index. How can I connect

    Hi joedoerksen,

    Follow these methods.

    Method 1: Start the computer in safe mode. Built-in Administrator account would be displayed on the Welcome screen. Choose the account administrator and you should be able to boot to the desktop, if you have not set a password for the default Administrator account.

    Method 2: If you have set a password for the default Administrator account, then the only option is to go for a parallel installation of Windows XP and retrieve documents.

    Follow the method 4 install Windows XP to a new folder (parallel installation) of the article.

    How to install or upgrade to Windows XP

    http://support.Microsoft.com/kb/978307

    Method 3: Follow the steps in the article.

    How to connect to your Windows XP-based computer if you forget your password or if your password expires

    See the article on the Microsoft Policy on lost or forgotten passwords.

    Microsoft's strategy concerning lost or forgotten passwords

    http://support.Microsoft.com/kb/189126

  • I often receive an email containing more than 10 images, but when I get this message, I can't as a pop up comes up and tells me that I must remove some of the attachments.

    I often receive an email that contains more than 10 images (attachments) but when I get this message, I can't as a pop up comes up and tells me that I must remove some of the attachments that would destroy a part of the message.  What should I do to correct this?

    The images may be too large to send massively as they must be encoded to send by e-mail, and this coding can add as much as 40% of the size of the message.  You can resize to fit the web by reducing their dots per inch to 96 (screen resolution) and then saving them as a compressed jpeg files.  IrfanView (www.irfanview.com - free) will do this for you.

    You can also try Message | To send as an attachment and see if it goes through.

    Steve

  • Need help to take down the netkey password so I can get some things, he won ' t let me in.»

    Original title: Netkey

    I need help for the netkey password so I can get some things, he won ' t let me in..

    We can't really help a lot with that here, but you can contact the company that makes NetKey here:

    http://www.NCR.com/contact-us

    They can help how to use them (or remove) their system.

  • URGENT::opening multiple files - i have 3 files in my directory... When I run the code I can open a file and read it... but the while loop get blocked after the first iteration... can someone me help or give some indications

    bbmChatDB of public database;

    public static FileConnection fconnRead = null;
    public static String fileReadData = "";
    public static InputStream is = null;
    data Byte [] = null;
    DataInputStream is = null;

    Here is my code...

    I have 3 files in my directory... When I run the code I can open a file and read it... but the while loop get blocked after the first iteration... can someone me help or give some indications

    try {}

    FileConnection fc = Connector.open("file:///store/home/user/documents/BSM/") (FileConnection); "

    If (fc.exists ()) {}

    Enumeration e = fc.list ();

    While (e.hasMoreElements ()) {}

    System.out.println ("files are:" + (String) e.nextElement ());

    play this file
    StringBuffer stringBuff = new StringBuffer();
    try {}
    System.out.println ("opening file")-;
    System.out.println ("file name is:" + (String) e.nextElement ());
    fconnRead = Connector.open("file:///store/home/user/documents/BSM/(String)e.nextElement(),Connector.READ_WRITE) (FileConnection);
    System.out.println ("data length")-;
    If (fconnRead.exists ()) {}
    is = fconnRead.openDataInputStream ();
    data = IOUtilities.streamToBytes (is);
    Ddd = new String string (data);
    fileReadData = ddd.toString ();
    System.out.println ("length of data:" + fileReadData.length ());
    System.out.println ("read data :" + fileReadData);

    }

    } catch (IOException ee) {}
    ee.printStackTrace ();
    System.out.println ("Exception in the read data :")
    + ee.getMessage ());
    }

    }
    }

    } catch (IOException e) {}

    e.printStackTrace ();
    }

    {Finally

    try {}
    If (is! = null) {}
    is. Close();
    }
    System.out.println ("is closed...");
    } catch (IOException e1) {}

    E1. PrintStackTrace();
    }

    If (fconnRead! = null) {}
    try {}
    fconnRead.close ();
    } catch (Exception e) {}
    System.out.println (try ());
    }

    }

    }

    You can recode this treatment so that it uses only:

    e.nextElement ())

    Once a loop iteration.

    Directly at the start saying something like:

    String fileName = e.nextElement ());

    and use fileName everywhere in your loop.

    Also be aware that printStackTrace() will do nothing in your situation, it only works if you catch Throwable.  So make sure you something output all your catches exception and also have a catch (Throwable t) to catch the things you miss, as follows:

    {} catch (Throwable t)

    t.printStackTrace ();

    System.out.println ("Eception exception:" + t.toString ());

    }

    I think your code is thrown an exception and you don't see it.

Maybe you are looking for

  • CTRL F it does not work

    I tried to look at the other topics that are similar, but none of them share the same problem with the search bar. Whenever I do Ctrl + F, the search bar is up, but real research doesn't seem to work well. For example, if I had a web page to the top,

  • Cursor disappears when the color selection

    Hello I recently worked with pages and came across this strange question, when I select the eyedropper and I try to pick a color, the cursor disappears suddenly. This isn't a major problem, as this can be corrected instantly by using CMD + Tab, but I

  • Connected same drain battery adapter - Satellite P30 133

    You just bought a used machine but the battery seems to flow even when the adapter connected (and turned on!). Battery, adapter or another problem?

  • I have 8-10 instances of svchost.exe in the Manager of tasks at a given time. XP SP3/w 4 gig of ram.

    The title is the question. I have 8-10 instances of svchost.exe in the Manager of tasks at a given time. XP SP3/w 4 gig of ram. Is this normal? I often have problems with General slowness and svchost uses a lot of ram. Any ideas? Chris

  • Launcher Android

    I would like to know if Acer had a custom android Launcher? Try nova, buzz etc but they all of is not in what I want. Prefer something small and light, but have an option to rearrange icons