How can remove child into file xml using J2ME

i want to delete child from file xml using midlet but nothing is changed into file
please help me
* To change this template, choose Tools | Templates
* and open the template in the editor.
package ajou;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.util.Vector;
import javax.microedition.io.Connector;
import javax.microedition.io.HttpConnection;
import javax.microedition.midlet.MIDlet;
import org.kxml2.io.KXmlParser;
import org.kxml2.kdom.Document;
import org.kxml2.kdom.Element;
import org.kxml2.kdom.Node;
* @author -Manel-
public class manelGO extends MIDlet {
public void startApp() {
try {
          //Open http connection
          HttpConnection httpConnection = (HttpConnection) Connector.open("http://localhost:8080/examples/users.xml");
               //Initilialize XML parser
               KXmlParser parser = new KXmlParser();
               parser.setInput(new InputStreamReader(httpConnection.openInputStream()));
               Document theDoc = new Document();
               theDoc.parse(parser);
               Element rootElement = theDoc.getRootElement();
rootElement.removeChild(1);
          catch (Exception e) {
               e.printStackTrace ();
public void pauseApp() {
public void destroyApp(boolean unconditional) {
}

To achieve this you can use the bpelx:remove function: http://download.oracle.com/docs/cd/E12483_01/integrate.1013/b28981/manipdoc.htm#CIHJBJFD
your assign will look like:
<bpel:assign>
<bpelx:remove>
<target variable="person" query="/person/@per" />
</bpelx:remove>
</bpel:assign>
Regards,
Melvin

Similar Messages

  • How can i put some file (xml) in root apk?

    how can i put some file (xml) in root apk?
    I put fileA in flash builder mobile project.
    build apk.
    fileA  →  "main.apk/assets/fileA" . 
    expect → "main.apk/fileA" .
    PS: view apk by Winrar.
    I have a Demo Android java project.
    It uses armeabi/libcasdkjni.so .
    build apk

    +assets
    +lib
    +META-INF
    +res
    -AndroidManifest.xml
    -classes.dex
    -CopyrightDeclaration.xml
    -mmiap.xml                                                       ←   fileA
    -resources.arsc
    -VERSION
    i build an ANE include armeabi/libcasdkjni.so.
    apk is missing mmiap.xml

    all files will be embed in "assests"(floder in apk ,which includes swf file) in that way.
    build apk

    +assets                                ←         "assets"
    +lib
    +META-INF
    +res
    -AndroidManifest.xml
    -classes.dex
    -CopyrightDeclaration.xml
    -mmiap.xml                                                       ←   fileA
    -resources.arsc
    -VERSION

  • How can i get a file header using this method cl_gui_frontend_services= gui

    Hi Experts,
    How can i get a file header using this method cl_gui_frontend_services=>gui_download
    Thanks
    Basu

    Hi,
    You can use the FM - GUI_DOWNLOAD to specify the headers. It can be done in the following manner -
    TYPES: BEGIN OF ty_head, "Structure for header
                 h(10) TYPE c,
                 END OF ty_head.
    DATA: it_head  TYPE TABLE OF ty_head WITH HEADER LINE.
    "Adding header details
    it_head-h = 'Field1'.
    APPEND it_head.
    it_head-h = 'Field2'.
    APPEND it_head.
    it_head-h = 'Field3'.
    APPEND it_head.
    it_head-h = 'Field4'.
    APPEND it_head.
    CALL FUNCTION 'GUI_DOWNLOAD'
      EXPORTING
        filename                        = p_file
       filetype                        = 'ASC'
       write_field_separator           = 'X'
       header                          = '00'  "<= note this
      TABLES
        data_tab                        = it_tab
       fieldnames                      = it_head[] "<= Pass your header table here
    EXCEPTIONS
       OTHERS                          = 1.
    Hope this helps.
    Regards,
    Himanshu

  • How can I convert .mov files for use with other apps?

    When loading movies taken on a friend's digital camera to my PC, the video files were saved as Quicktime .mov files. I am now unable to pull those files into any other software program (I want to put them onto a CD or DVD and play on external players.) How can I convert .mov files to a .wmv or .avi or mpeg?
    Thanks - J
    RS720G   Windows XP  

    Kodak Digital Camera QuickTime MOV Problems
    After battling a number of serious problems with the videos taken by my new Kodak Digital Camera, I decided to write up this page so that anyone searching the web would find out the true answers without as much grief!
    I’ve also made some other comments about my experience with the camera, in case anyone was considering buying a Kodak camera in the near future.
    I bought the camera just before Christmas 2004 in the US. At the time of writing, it is a pretty good model for domestic use—about 5.2 megapixels, costing about US$400 (or AU$600 back here in Australia). From a company as reputable as Kodak, I expected no problems.
    The first disappointing thing was that the spring inside the spring-loaded battery clip, inside the camera, came loose within days. It proved impossible to reattach it without completely dismantling the camera, which (despite my engineering qualifications) I was not willing to do. This would usually have been a warranty item, but Kodak’s warranty does not extend to other countries. I’ve since had to jam cardboard in to keep the battery clip engaged, and have taped the battery bay shut to avoid it opening accidentally when taking the camera out of the case. This works fine with the docking station (an extra AU$100!), but it means I can no longer charge the battery without the docking station (since you need to take it out to charge it). I was not impressed!
    The camera takes good photos, and I have no complaint with that. The controls and camera menus are well-designed. The large display is excellent.
    The EasyShare software is not as easy to use as it looks, has a habit of crashing, has a web update program that is always running in the background of Windows, and transferring images is nowhere as easy or quick as it should be. I’ve now uninstalled it completely, and simply copy the photos directly from the device. (If the camera memory is nearly full, and you just want to transfer the last few photos, then it’s impossible to use the EasyShare software to browse the camera’s photos without it actually downloading the whole lot through the USB cable—and it takes forever! Copying from the device directly doesn’t hit this bug.)
    The capability to take video using the camera was a great attraction when I selected it, and, if it worked properly, it would make it quite a handy little camcorder in its own right. With a 512 MB memory card in it, over an hour of video can be recorded at Video-CD quality (320 x 240 24fps video, 8 kHz audio). It’s not full digital video, but it would still be a pretty good feature for a US$400 camera. If it worked.
    The first disappointing thing about taking videos is that the optical zoom cannot be adjusted while the camera is recording. It can only be adjusted between video sequences. I don’t know why this restriction was made in the design.
    The real problems, however, start when you try to do anything with the video clips captured by the camera. Kodak has chosen to capture the videos in QuickTime format. This is fine—QuickTime is, technically, excellent—except that there is no simple way to convert QuickTime MOV files to AVI or MPEG or VCD. The Kodak software comes with a QuickTime player, so you can see the video clips on the computer you installed the software on—and they look good. Problem is that you can’t just dump those MOV files onto your Video-CD creator (it will usually want AVI or MPEG files).
    It takes some time to realise that Kodak have not even bothered to include any software with the camera that can convert these MOV files to a more useful format. This is a serious PR blunder, and anyone bitten by this is unlikely to go near the Kodak brand ever again.
    After some web searching, owners of these cameras generally find that the best (only?) freeware solution to convert MOV to AVI is Bink and Smacker’s RADtools program.
    RADtools is amazingly powerful for the price (i.e. free), but it hits two fundamental problems with Kodak Digital Camera MOV video files, that are the fault of the Kodak camera, not RADtools. (I know this because every other MOV converter hits the same problems—except one, as you will see below.)
    The first problem is that the sound cannot be converted properly. When you convert any Kodak MOV files, there is an “aliasing” of the sound at the upper frequencies. This is a technical description—you get a whispery, tinny, C3PO type of echo to everything. It really destroys the quality of the video clips (especially bad when I am trying to capture priceless memories of my 4- and 7-year-old sons—I don’t want their voices destroyed for all time).
    Every conversion program I tried ended up with the same audio problem. I concluded that it is something strange in the way the Kodak cameras store the MOV files.
    Strangely enough, I noticed that the QuickTime player didn’t distort the audio like this. The audio sounds just fine through QuickTime. More on this shortly.
    The second, more serious problem is that RADtools could not properly convert some of the video clips at all. (This problem only affected less than 10% of the clips I originally filmed, but most of those clips were very short—less than 20 seconds. It seems that the probability of this problem gets worse, the longer the clip.) RADtools would misreport the number of frames in the clip, and would stretch out a small number of frames of video (in slow motion) to match the length of the audio.
    Again, I confirmed that this is a property of some of the MOV files stored by the camera. Other conversion tools also had problems with the same MOV clips.
    After more angst, I found a number of websites in which frustrated owners of these Kodak cameras have reported the exact same problems.
    It was only then that I discovered that QuickTime itself can convert MOV files to AVI. Believe it or not, it’s built into the QuickTime Player that Kodak supplies, or that you can download free from apple.com. The problem is that you can’t use it unless you pay Apple to upgrade to QuickTime Pro.
    After realising that this would probably be the only way to get decent audio for these clips, I paid the AU$59 to Apple Australia to get the licence key that enables the extra “Pro” menu options in QuickTime.
    Sure enough, you can “Export” any MOV file to a number of formats, including AVI. And guess what? The audio comes out fine!
    So, the first piece of advice I can give is: pay Apple the US$29 (or whatever amount it is in your country) to upgrade QuickTime to QuickTime Pro.
    From here, however, there are still a few snags to untangle.
    The first is that the default settings for Exporting to AVI don’t give a great result. It defaults to the Cinepak codec, medium quality. This looks terrible compared to the original QuickTime movie. Even on maximum quality, that codec just doesn’t give good results.
    I finally found that the best option is to use the Intel Indeo Video 4.4 codec, set on maximum quality. This creates AVI files that are 10 to 20 times larger than the original MOV files, but the quality is there. If (like me) you only want the AVI files so you can dump them into your Video-CD program, then you want to keep the quality as high as possible in this first step. The extra hard disk space is not really a concern. When your VCD program converts the AVI files to MPEG, it will compress them to the usual VCD size.
    Now for the biggest snag: those problem MOV files are still a problem, even for QuickTime Pro. Unbelievably, these Kodak cameras are spitting out MOV files which have some sort of technical flaw in their data specifications. QuickTime is able to play them back fine—and that seems to be all that the Kodak engineers really checked. However, if QuickTime Pro tries to export them, then when the progress bar gets to the end, it never finishes. It just keeps going. If you check the output folder with Explorer, and keep hitting F5 to update the file listing, you can see the file getting bigger, and bigger, and bigger. It never stops.
    That this happens even for QuickTime itself (the native format for these files) confirms that the problem is with the software built into these Kodak cameras. It would be nice it they issued a patch or a fix. I couldn’t find one.
    Fortunately, there is a “workaround” for this problem. I found it when trolling the net trying to find solutions to all these problems. The workaround is to use QuickTime Pro’s cut and paste facility. Open the problem MOV file, then press Ctrl-A (the standard key combination for “select all”—in this case it selects the entire film clip, as you can see by the grey selection of frames at the bottom of the player). Then hit Ctrl-C (i.e. copy, which in this case copies all the frames, but not the incorrect data structure in the original MOV file). Now hit Ctrl-N (i.e. new, in this case a new MOV file or player). In this new player, press Ctrl-V (i.e. paste). Now you have a new version of the MOV file with the bad data structure exorcised. You can save this under a new name, but make sure you specify “Make movie self-contained”—otherwise, it will simply be a link to the original (bad) MOV file, which you are probably going to delete once you save the exorcised version. (You also cannot overwrite the original file, because it needs to access that to make the “self-contained” movie. You need to give it a slightly different name, save it “self-contained”, then delete the original and rename the new copy back to what you wanted it to be. A pain, I agree, but at least the **** thing works—finally!)
    The exorcised MOV file can now be used to Export to AVI format. (I also keep all the MOV files on a separate CD, in case I want to reconvert them to a different format in the future. I figure it’s better keeping the exorcised ones than the haunted ones.)
    So I hope that all this answers a few of your questions. No, you weren’t being incredibly stupid.

  • How can I know which file is using by the self-service workflow?

    Dear all:
    In my directory, there are two HRSSA.wft and How can I know which source is using by the workflow of the self-service ?
    my environment is oracle 11.5.9 | self-service 4.1 | workflow builder 2.6
    Thanks
    regards
    Terry

    One way would be to download the HRSSA workflow to a wft file (using the WFLOAD utility - see MOS Doc 578248.1), then comparing this downloaded wft file with the two files you have (using a utility such as diff in Unix). The comparison that reports no differences will identify the wft that was uploaded into the database.
    HTH
    Srini

  • How can I lock the file in use

    Dear All, I transfer the large text file to Solaris 10 server and copy the this file with transfer not success to another path. but I can open the file with end of file. How can I lock the file with transfer not successfully.

    Locking on UNIX is cooperative, not manditory. That means that all applications need to check for the lock explicitly and then not use the file if the lock exists.
    But if something is accessing the file beyond your control, locking isn't going to prevent it.
    If you do control all the access points, then take a look at lockf or flock functions.
    Darren

  • How can I log into my new (used) Ipad if the previous owner has the only log in information?  I purchased it through Glyde and have no information on the seller.

    How can I activate my new (used) Ipad if the previous owner has the only log in information?  I purchased it through Glyde and have no information on the seller.

    What you've run into is the activation lock. Previous owners are supposed to wipe their devices, and to do that they have to enter their apple ID's. If yours wasn't wiped then it was a careless owner, or the dark side is that whomever sold it, it wasn't theirs to sell.
    Regardless, what Deggie says is your only recourse. Get your money back or own an unusable brick.

  • How can split data into multiple sheets using an excel template

    Hi all,
    I'm using BIP 10.1.3.4.1 upgrated with the latest rollup patch, 9546699.
    I followed the example inside the article "Real Excel Templates 1.5" (on the Tim Dexter's blog)
    http://blogs.oracle.com/xmlpublisher/2010/05/real_excel_templates_i.html
    and I built my report directly from an excel template containing only one sheet (plus the XDO_METADATA sheet), and for one sheet it worked fine !!!
    Now I need to add more sheets to the template.... and I have two big questions:
    1. if I need to create a second sheet which contains almost the same data (with a different layout), I saw that it is not possible to map a value to more than 1 cell....so if I map a value in the first sheet, I can't map it in the second sheet (because it's already used in the first one).
    How can I map same values into two or different execll
    2. if I need to create a second sheet which contains another dataset (completely different from the dataset in the first sheet), I can I do, considering that every BIP report is based on ONLY a data source.
    Tim wrote: The most impressive, for me at least, is the sheet 'bursting'. You can split your hierarchical data across multiple sheets and dynamically name those sheets
    but I didn't yet understand how this bursting it's possible.....considering what I said above.....
    Surely I've a lack of knowledge.....but anybody can help me to understanding the "multiple excel sheets" black hole ?
    I'll appreciate any kind of help
    Thanks in advance
    Alex

    You can find working solution here http://xlspe.com

  • How Can i create this  especific xml using structNew()?

    Hi everyone!
    I'm starting my first steps using coldfusion technology and i have been facing some problems when i try to create a client that consumes my webservices.
    What i trying to do is:
    to create this kind of xml structure:
    <elem att1="1" att2="2"/>
    i use this coldfusion code:
    elem= structNew();
    elem.att1= "1";
    elem.att2= "2";
    But, what if i want to create this kind of structure
    <elem att1="1" att2="2">ELEMENT VALUE</elem>
    what can i do to insert the element value "ELEMENT VALUE"
    I tried structInsert, but i don't think it'll help me.
    Thank in advance,
    Felipe

    Thanks again for your help and patience, Ian.
    I wrote two client webservices using coldfusion structNew() and worked perfectly because they didn't use element values, just attribute values
    In my client webservices i use this to consume the webservices:
    message= structNew();
    message.date = "2009-11-16";
    message.num = "010203";
    user= structNew();
    user.account= "902301003456175";
    user.pwd= "123456";
    objetcWS = structNew();
    objetcWS.message = message;
    objectWS.user = user;
    ws = createObject("webservice", "http://www.somedomain.com/soap/wsfile.wsdl");
    return =  ws.getSomeData(objectWS);
    Those codes above creates the xml request structure that communicates  with  the servef through SOAP protocol:
    <message date="2009-11-16" num="010203"/>
    <user account= "902301003456175" pwd= "123456"/>
    As i said, that works fine, but the problem is when i have to send to my webservices server something with the xml structure like this
    <user account= "902301003456175" pwd= "123456">USERNAME</user>
    i have no idea how to set the value (Text) of the element user.
    That my main question (for now hahahaha).
    sorry for any confusing concepts i wrote.
    Thanks again

  • How to remove elements/attributes from XML using Xpath in XSLT ??

    Hello ,
    Is there anyway or method of Xpath from which I can delete the elements and attributes from XML at runtime ??
    Like I have such XML and I have to remove per attribute highlighted below
    <person per="and">
    <e:emp a="ir" b="ad" >
    </e:emp>
    </person>
    And want a result like this
    <person>
    <e:emp a="ir" b="ad" >
    </e:emp>
    </person>
    Thanks

    To achieve this you can use the bpelx:remove function: http://download.oracle.com/docs/cd/E12483_01/integrate.1013/b28981/manipdoc.htm#CIHJBJFD
    your assign will look like:
    <bpel:assign>
    <bpelx:remove>
    <target variable="person" query="/person/@per" />
    </bpelx:remove>
    </bpel:assign>
    Regards,
    Melvin

  • How can I convert .voc files to use on my Mac?

    I bought a little RCA audio recorder which works great... except that my iMac doesn't seem to recognize the .voc files that the recorder produces.  I tried "Switch", but it didn't do any better.  I tried "Sox", but immediately got a message that it quit unexpectedly.  WHAT MIGHT WORK?????? 
    Thanks,
    Ted

    This should do the trick:
    http://www.bigasoft.com/articles/how-to-convert-voc-to-mp3-wav.html

  • Parsing xml using j2me

    hi
    how can i insert into file xml in midlet for exemple
    <users>
    <user>
    <name>manel<name>
    </user>
    </users>
    it will be
    <users>
    <user>
    <name>manel<name>
    </user>
    <user>
    <name>hajer<name>
    </user>
    </users>
    thx

    You can use kxml for this.
    Regards,
    David.

  • How can I save a file using In Design 6.0 and open it in 5.5

    We have Creative Suite 6.0 and 5.5. How can we read a file created using In Design 6.0 on another computer that has version 5.5?

    The file needs to be saved to IDML from CS6.
    Mylenium

  • How can I read a file with ASCII Special Character into a SQL table using SSIS 2008?

    I've tried everything to read this file and am getting no where.   Help how can I read this file and load a SQL table?
    RS - AscII - 30  (Record Separator)
    GS - AscII - 29 (Group Separator)
    Thank you for your assistance - Covi
    Mark Covian

    We can use script component as source/transformation to read the text file and assign the contains to a string. Split the string by chr(30)  i.e RS and finally stored into an array or write to the output buffer of the script component.
    For example on how to use script component refer this link
    http://social.technet.microsoft.com/Forums/en-US/6ff2007d-d246-4107-b77c-624781baab38/how-to-use-substring-in-derived-column-in-ssis?forum=sqlintegrationservices
    Regards, RSingh

  • After burning a successful DVD in iDVD out of FCPX, how can I see the settings it used?   So I finally burned a DVD out of a Apple Pro Res file into iDVD in PAL format. My question now is how can I find out what the exact burn properties were so that I ca

    After burning a successful DVD in iDVD out of FCPX, how can I see the settings it used?
    So I finally burned a DVD out of a Apple Pro Res file into iDVD in PAL format. My question now is how can I find out what the exact burn properties were so that I can apply the same burn properties to a project in Compressor 4?
    Is it possible to see what iDVD did?

    I don't know any way you can interrogate iDVD to reveal settings to the extent that you can in a Compressor project. What you could do is open up the show's VOB in MPEG STreamclip, go to File and Reveal Stream Information; that will at least give you some rudimentary info like average bit rate. Perhaps someone, with more iDVD experience, can chime in here.
    The broader question is why use Compressor at all if your current workflow is doing the job to your satisfaction?
    The value of Compressor is that it gives you control over the many parameters that affect size quality.  and playability. The Compressor presets can give you a starting point for DVD delivery, Web, etc. From those presets, people typically experiment by adjusting the parameters until they get the desired results for their specific show. It's a little bit science and a little bit art. After experimenting, you may be able to get slightly better quality for the project you've successfully burned in iDVD by using Compressor and something likeToast…or maybe not.
    Good luck.
    Russ

Maybe you are looking for

  • Touch screen calibration on Stream 8 5801TW

    I just udate the drivers of tablet, and after update touchscreen calibation is totally out, I even tried windows calibation tool, which asked me to touch cross signs around the display, but still it does not help.   At the moment Im using a usb mouse

  • Email pix resolution too big or too small...for starters

    I use Entourage. With new iPhoto, it bypasses Entourage and sends via my POP account. Still, iPhoto doesn't give me any record of sending out pictures via email. AND, I can't even determine a proper size of resolution. I went with the first choice 'B

  • Employee Photos from KM

    I have a requirement to print Employee photos on a Smartform. These photos are stored separately in a Knowledge Management folder on Portal. Any thoughts on how this can be acheived would be highly appreciated.

  • Random store connections.

    Half the time my iPad 2 tells me it can't connect to the App Store. When it does connect however, it does so to a random store. So far it's told me that I can't use the stores in the UK, US, Egypt, India and possibly Russia (can't  read Cyrillic) and

  • [GUI programming] How do two JPanels interact?

    Hi, all I've been looking if there is a standard/mostly-used way implementing GUI applications. e.g., under a JFrame, there are 2 MyPanel exntending JPanel, one placed on the leftside, the other on the rightside. they both have got a bunch of JButton