How can I extract ? Please help me.........

First of all, I am very new user to XML and also Java. If my question is nonsense, forgive me, please.
I would like to test that the string in the node are equal with some string that I want to search. I use DOM API.
The following code are ok for the node is directly included text CDATA. The program gives the true value. In the following simple code, I tried to search the string "ACTI".
for example; the node, <LABEL>Problem in Activity</LABEL> , I got "true".
But I would like to match also the node ,
<SLOT label="slot" kind="a/o" role="occurs in" class_constraint="Activity" >
There is also "Activity" string value in class_constraint.
So how can I extract and match that string data?
Help me please!
case Node.CDATA_SECTION_NODE:
System.out.println(node.getNodeValue());
if (node.getNodeValue() != null) {
     String aa = (node.getNodeValue().toUpperCase());
     if ( (aa.indexOf("ACTI") >= 0))
     System.out.println("true");
     else
     System.out.println("false");
<CONCEPT>
<LABEL>Problem in Activity</LABEL>
<SLOTS>
<SLOT label="slot" kind="a/o" role="occurs in" class_constraint="Activity" >
</SLOT>
</SLOTS>
</CONCEPT>

Thank you very much for your help.
I do appreciate your reply.
As I gave my code example in my first post, I parse the XML document and I checked each node whether it is CDATA Node or Document Node, Element Node, and so on.. I used CASE statement.
If it is CDATA node, I compare Node value and the string I want to search.
At that time, I faced the problem that you solved already, I didn't know how to compare in attribute node.
With your suggestion, I can compare now.
But the problem now is that... when I extract element by tag name, it cannot test node by node.
So, how can I combine these two code?
Actually, what I am going to do is that if node is not match (in anywhere) with the string what I want to search starting from parent node to all child nodes, I want to delete that node starting from parent node and it's childs. And I want to create a new XML document by deleating unmatched nodes.
For example, in the following XML, I would like to delete the second <CONCEPT> node while I search for "Acti" string. There is no "Acti" in the second.
<CONCEPT>
<LABEL>Problem in Activity</LABEL>
<SLOTS>
<SLOT label="slot" kind="a/o" role="occurs in" class_constraint="Design" >
<SUB_L label="" def="" role_name="" class_const="Activity" />
</SLOT>
<SLOT label="slot" kind="a/o" role="occurs in" class_constraint="Const" >
<SUB_L class_const="Activity" />
</SLOT>
</SLOTS>
</CONCEPT>
<CONCEPT>
<LABEL>Problem in REQ</LABEL>
<SLOTS>
<SLOT label="slot" kind="a/o" role="occurs in" class_constraint="Req" >
<SUB_L class_const="Change" />
</SLOT>
</SLOTS>
</CONCEPT>

Similar Messages

  • I want to upgrade my iphone to 7 ios is it possible ? if it how can i do ,please help me !

    i want to upgrade my iphone to 7 ios is it possible ? if it how can i do ,please help me !

    Which iPhone do you have and what version is it currently running?

  • Hi. i lost my iPhone 5, how can i find please help?, hi. i lost my iPhone 5, how can i find please help?

    Hi. i lost my iPhone 5, how can i find please help?

    If you have "find my iphone" enabled under iCloud settings you can go to iCloud.com and locate your phone. Good Luck.

  • I am installing this player but did not installed how can i installed please help me

    whenever i installed this player installation is failed.kindly help me.

    What is your operating system & version?
    What is your web browser?
    What exactly failed - do you get an error message?

  • How to install windows 7 on my macbook pro mid 2009 using usb. right now aim using mavericks 10.9 can any one please help me. I tried to edit plist in boot camp but it went wrong please help me

    how to install windows 7 on my macbook pro mid 2009 using usb. right now iam using mavericks 10.9 can any one please help me. I tried to edit plist in boot camp but it went wrong please help me.
    Iam new to coding. please help me.

    try the solution posted by kunu here and report back
    https://discussions.apple.com/thread/5105056?tstart=0

  • HT204230 this device is not longer eligible for creating a free i cloud accounting on my Iphone 5s , my old not working now cannot opened again just when i try make a free email this Message showed up  how i can fix it please help me  iPhone 5s, iOS 8.3

    this device is not longer eligible for creating a free i cloud accounting on my Iphone 5s , my old not working now cannot opened again just when i try make a free email this Message showed up  how i can fix it
    please help me
    iPhone 5s, iOS 8.3

    Create a new AppleID on a different iOS device or on a computer. You will
    then be able to use that newly created AppleID on your iPhone.

  • I bought CS6 creative suite. As of now i need to work each application in separate separate system. Can any one please help me how to solve this problem.

    I bought CS6 creative suite. As of now i need to work each application in separate separate system. Can any one please help me how to solve this problem.
    I saw the below quote on Adobe forum
    "You may install software on up to two computers. These two computers can be Windows, Mac OS, or one each."
    If i install each application in single single system the system count is more than two. In this case, are we have any license issue? Please advice how the problem will solve?
    If possible please send the advise to my mail id: <Removed by Moderator>
    Thanks
    Uvaraj S

    I already answered that.  If you purchased a Suite then you can only install and activate it on two machines.  Even if you only insdtall one of the applications of that suite, it counts as one activation of the suite.  You cannot take the six or seven different applications that might be in a suite and install and activate them in six or seven different machines... only two machines.
    If your scenario will allow for it, one thing you can do is install the programs on all the different machines and only activate two of the machines at any given time.  If you need to activate a program on a third machine then you need to deactivate on one of the currently activate machines first so that you have an open activation to use again.  I do not remember if there is a limit to the total number of activations you can process for the life of the software.

  • How can put photo comment in Facebook in safari or other browser, am using ipad 4 and this was working perfectly but unfortunately it's not working now..the attach photo feature is there but can't attach, please help me in this

    How can put photo comment in Facebook in safari or other browser, am using ipad 4 and this was working perfectly but unfortunately it's not working now..the attach photo feature is there but can't attach, please help me in this

    How can put photo comment in Facebook in safari or other browser, am using ipad 4 and this was working perfectly but unfortunately it's not working now..the attach photo feature is there but can't attach, please help me in this

  • I want to initialize my MBpro end reinstall lino, but I purchased it from apple store and cancelled the installation file. If i try to download again it from appstore I couldn't...How I can do ? Please help me

    I want to initialize my MBpro end reinstall lino, but I purchased it from apple store and cancelled the installation file. If i try to download again it from appstore I couldn't...How I can do ? Please help me

    Thanks for the feedback. Now, before installing in, put a copy some place safe and you won't have to download it again, wasting bandwidth, time, and electricity. Why? Because the installer blows itself away during the installation—IMO, a braindead delivery system, copied from their iOS world, but totally unsuitable for computers.

  • How can i get some help to cancel my single app month to month and/or upgrade to full creative cloud membership? please don't tell me to follow the guidelines because i've tried several times but the options to 'switch plan' or cancel plan' are not availa

    how can i get some help to cancel my single app month to month and/or upgrade to full creative cloud membership? please don't tell me to follow the guidelines because i've tried several times but the options to 'switch plan' or cancel plan' are not available on my screen

    Keensy I have requested a member of our support team contact you directly via telephone.  Once I was able to review the correct account it appears our support team has tried multiple times to contact you.  I would recommend checking your SPAM filtering in case you need to receive additional messages from our support team.
    I did request that you be contacted via telephone. I am sorry for all of the difficulties which you have faced.
    For future viewers of this discussion when contacting our support team at Contact Customer Care it is imperative that you be logged in under the account tied to your membership/subscription.  While there is cancelation options available you will have an increased chance of being offered an opportunity to contact our support team if your account entitlement can be verified.  For this to be done you will need to be signed into the same account as your membership/subscription/registered software title.

  • I have no sound alerts on my iphone5. My software is up to date. I can hear on a call but I have no text alerts, no ringtones, nothing that involves sound! Everything was okay a few hours ago. I have no idea how this happened. Please help!!

    I have no sound alerts on my iphone5. My software is up to date. I can hear on a call but I have no text alerts, no ringtones, nothing that involves sound! Everything was okay a few hours ago. I have no idea how this happened. Please help!!

    I tried the compressed air, Qtip, etc... still nothing. Called Apple again.... and we did a complete factory reset from iTunes, wiping everything out... still no sound, which proves that it is a hardward problem, under warranty, I have to have phone replaced   No Apple repair centers within 300 miles of me! So... shipping phone off today. Bummer.

  • People Please help, I forgot my security questions answers but I know how to reset them but the problem is my rescue email is not longer used ( DELETED ) so what can I do please help me

    People Please help, I forgot my security questions answers but I know how to reset them but the problem is my rescue email is not longer used ( DELETED ) so what can I do please help me??????????

    EZZTHEKILLER wrote:
    is there any other way ...
    Not in your case.
    EZZTHEKILLER wrote:
    I forgot my security questions answers but I know how to reset them but the problem is my rescue email is not longer used ( DELETED )

  • Help! I can't add iCloud to my new ipad. The address it has sent verification to us incorrect.  How can I rectify please.

    Help! I can't add iCloud to my new ipad. The address it has sent verification to us incorrect.  How can I rectify please.

    Aw, come on, please... ):

  • HT201472 can you guys please help me find my ipod because i lost it a week ago and i cant find it i've been trying really hard to find it but i cant cause i didn't set up find my phone before i lost it so my question is can you help me someway here my

    can you guys please help me find my iPod because i lost it a week ago and i cant find it I've been trying really hard to find it but i cant cause i didn't set up find my phone before i lost it so my question is can you help me someway  or somehow because my iPod i love it i would always take pictures with my friends and i have all my memories in it so i don't know where it is for all i know it could be on the street getting ready to get ran over because the last time i ever saw it was on last Sunday when i went to my cousins house when we were leaving i grabbed something to eat then i sat at the table then i left but i swear i had it in my pocket when i left but i didn't so i asked my cousin if he could look for it and he said sure so he started looking for it but didn't find anything and so i lost it sense and i asked my dad if i could get a new one and he said in a couple of years but i want that iPod back it has all my memories in it it's really special to me and i'm really desperate so please help me someway somehow anyway just help me please i don't know what else to do but beg for someone to help me because I've tried looking for it in my car in my room in my coats and nothing i tried looking for it on the website find my iPhone/iPod/iPad and it didn't help so please help me i beg of you if you are reading this and don't care you really are heartless because a little 12 year old girl can't find the most precious thing she got from her father 1 year ago and if you are reading this and you have a heart please help me find it if you do want to help me find it****
    <Personal Information Edited by Host>

    You are not addressing Apple here. We are all just users like yourself
    lost/stolen                                     
    No app on the iOS device is required.                           
    - If you previously turned on FIndMyiPod/iPhone/iPad on the iOS device in Settings>iCloud and wifi is on and connected or cellular data is on and connected for, on a computer browser go to iCloud: Find My iPhone, sign in and go to FIndMyiPhone. If the iPod has been restored it will never show up or continue to show off-line.
    - You can also wipe/erase the iOS device and have the device play a sound via iCloud.
    iCloud: Erase your device
    iCloud: Use Lost Mode
    - If not shown, then you will have to use the old fashioned way, like if you lost a wallet or purse.
    - Change the passwords for all accounts used on the device and report to police and carrier if iPhone or cellular iPad
    - There is no way to prevent someone from restoring the erase (it erases it) using it unless you had iOS 7 or later on the device. With iOS 7 or later, one has to enter the Apple ID and password to restore the device.
    - Apple will do nothing without a court order                                               
    Reporting a lost or stolen Apple product                                              
    - iOS: How to find the serial number, IMEI, MEID, CDN, and ICCID number

  • How can I extract the data from Xstring .

    Hi Gurus ,
    How can I extract the data from a XSTRING  .
    I have to get the data which is filled in the survey form the data is getting saved in form of xstring .
    Someone told me that there is a standard FM for that . but I am not able to find .
    Please reply with the FM in case some one knows about it .
    Thanks in advance .

    The following code works as of 7.0 (in any SAP system):
    FORM XSTRING_TO_STRING USING input TYPE xstring CHANGING output TYPE string.
    TYPES : BEGIN OF ty_struc,
              line TYPE c LENGTH 100,
            END OF ty_struc.
    DATA lt_char TYPE TABLE OF ty_struc.
    DATA length TYPE i.
    length = xstrlen( input ) / cl_abap_char_utilities=>charsize.
    CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
      EXPORTING
        buffer                = input
      tables
        binary_tab            = lt_char.
    CONCATENATE LINES OF lt_char INTO output RESPECTING BLANKS.
    output = output(length).
    ENDFORM.
    Edited by: Sandra Rossi on Mar 30, 2010 12:24 AM

Maybe you are looking for

  • Why can't I install Pages anymore?

    I have a late-2011 version of the Macbook Pro, bought in early 2012 and running OS X Lion 10.7.5. Sometime later in the year I paid $19.99 to download Pages from the App Store as it did not automatically come with my Mac. Recently my hard drive broke

  • Table Control in ITS is getting wrongly displayed

    Hi All, I Have developed a program(say abc) and created a screen for that program(abc). My issue is that,i have kept the table control in the box . When i execute the screen in se80 under the program(abc) ,its displaying properly ( i mean table contr

  • How to concatenate a string with spaces

    Dear experts, I would like to concatenate a string with three spaces, for example, CONCATENATE 'X' SPACE SPACE SPACE 'Y' INTO LV_RESULT. However, the result I got from executing the above statement is not 'X   Y' as I want, but rather 'XY'. I did try

  • Why won't my html snippets appear in any browser?

    My website is created in iWeb 3.0.4. My server is Machighway and I upload via FTP using Cyberduck. The problem I have been having, even on my old server before I transfered to Machighway is when I add any HTML snippet into my page, it works just fine

  • X11 not starting after upgrading to 10.5.4 using the combo update

    Because of a bug in Package Maker included with XCode 3.1 I ended up breaking my complete OS. After re-installing Leopard and using the Combo Update to 10.5.4 I am not able to run X11. I was able to use it prior to re-installing, but then I got the u