Urgent need for Adding Comments

Hai,
I have to add a comment before the root node dynamically.
I am adding a comment dynamically by using the following code.
//Getting the docuement.
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
DocumentBuilder db = dbf.newDocumentBuilder();
Document doc = db.parse("cd.xml");
//Getting the root element
Element rootElement = doc.getDocumentElement();
//creating the comment.
Comment comment = doc.createComment("A Document Comment");
//Adding comment before the root element.
rootElement.getParentNode().insertBefore(comment,rootElement);
//Transforming in to the xml file.
DOMSource ds = new DOMSource(rootElement);
StreamResult sr = new StreamResult(new java.io.File("cd.xml"));
TransformerFactory tFactory = TransformerFactory.newInstance();
Transformer trans = tFactory.newTransformer();
trans.transform(ds,sr);
Program is compiling and running sucessfully. But it is not getting added into the result XML File.

Document doc = db.parse("cd.xml");
//Getting the root element
Element rootElement = doc.getDocumentElement();
//Transforming in to the xml file.
DOMSource ds = new DOMSource(rootElement);...
trans.transform(ds,sr);The node you are using as parameter of the DOMSource constructor is the rootElement. The comment you insert before that element is, of course, before the rootElement object, so the DOMSource object should be created with the comment node as the constructor's input parameter.

Similar Messages

  • On click of lov new jsp page which has only text area for adding comment

    hi all ,
    please help me to do this task. on click of lov new jsp page should be opend which has only text area for adding comment and upon clicking submit on the jsp page the value entered on the textarea should fall on the text field of lov.
    with regards
    prabhakaran.p

    The only reason I see for such a requirement is "Notes" require more space for entering a detailed note and would be inconvenient to write it in small single-line text input box. But, still in this case, getting the entered text back to the page and displaying it will have the same inconvenience of reading it from that field. And, I still think that removing one amongst the two (text field or image link) would be good, design wise.
    Anyway, did u try the following:
    1. Add a flow layout to the table bean
    2. Add text input and image item to the flow layout.
    3. Attach the notes page as the destination uri for the image.
    Did u start the working on it, let us know how far did u reach so that we can guide you through from that point.

  • Urgent,need for code in bdc for co02

    hi all,
    im in urgent need of code for developing bdc tcode co02.
    Thanks for your help..

    1. Please record the transaction which you need to change the data in Co02 (Shop Order/Prod. Order)
    2. Create BDC program as normally you do it for normal BDC programs..
    Smaple Code with Recording.
    clear: bdcdata,messtab.
      perform bdc_dynpro using: 'SAPLCOKO1' '0110'.
      perform bdc_field using: 'CAUFVD-AUFNR' t_aufk-aufnr.
      perform bdc_field using: 'R62CLORD-FLG_OVIEW' 'X'.
      perform bdc_field using: 'BDC_OKCODE' '/00'.
      perform bdc_dynpro using: 'SAPLCOKO1' '0115'.
      perform bdc_field using: 'BDC_SUBSCR' 'SAPLCOKO1'.
      perform bdc_field using: 'BDC_OKCODE' '=KOWE'.
      perform bdc_dynpro using: 'SAPLCOKO1' '0115'.
      perform bdc_field using: 'BDC_SUBSCR' 'SAPLCOKO1'.
      perform bdc_field using: 'BDC_CURSOR' 'AFPOD-INSMK'.
       perform bdc_field using: 'AFPOD-INSMK' 'S'.
      perform bdc_field using: 'BDC_OKCODE' '=BU'.
      call transaction 'CO02' using bdcdata mode 'A'
                                            update 'S'
                                            messages into messtab.
    Thanks,

  • Urgent need for help

    Hi folks,
    I really need help to solve an urgent issue.
    The context
    We are about to deliver an e-learning course made essentially
    with captivate lessons.
    The content is accessed through an html Main Menu which in
    turn is nested in a frameset.
    The reason for that is that in the second half of the
    frameset resides the SCO script since the content will be
    ultimately accessed from an LMS.
    The problem
    To exit the captivate content at the end of a lesson and go
    back to the main menu, we insert a button in the last slide where
    we indicate the main menu dynamic file location in case of success.
    All links are working fine during execution except when the
    main menu is called from the frameset.
    It looks like if captivate simulations don’t know what
    to do when they are launched from a frameset.
    I tried to go around it using JavaScript in the button, but
    that also won’t work.
    Any help would be greatly appreciated.
    Thanks in advance
    Mike

    I'm unclear on the issue.
    This is an HTML page your group has made? The Main Menu is
    nested in a
    frameset? Or, as I would think makes more sense, the Main
    Menu us *part*
    of the frameset, with the other frame being what loads the
    Captivate
    content?
    So you want to bundle a bunch of Captivate SWFs into one HTML
    frameset...
    And when you load the Captivate file, since the Captivate's
    HTML file -
    that contains the code to communicate with the LMS API - is
    in a
    frameset, it can't find the LMS?
    Or is it a different issue?
    Why would you call the Main Menu from the Captivate file?
    Erik
    MichelGervais wrote:
    > Hi folks,
    >
    > I really need help to solve an urgent issue.
    >
    >
    > The context
    >
    >
    > We are about to deliver an e-learning course made
    essentially with captivate
    > lessons.
    >
    > The content is accessed through an html Main Menu which
    in turn is nested in a
    > frameset.
    >
    > The reason for that is that in the second half of the
    frameset resides the SCO
    > script since the content will be ultimately accessed
    from an LMS.
    >
    > The problem
    >
    > To exit the captivate content at the end of a lesson and
    go back to the main
    > menu, we insert a button in the last slide where we
    indicate the main menu
    > dynamic file location in case of success.
    >
    > All links are working fine during execution except when
    the main menu is
    > called from the frameset.
    >
    > It looks like if captivate simulations don?t know what
    to do when they are
    > launched from a frameset.
    >
    > I tried to go around it using JavaScript in the button,
    but that also won?t
    > work.
    >
    > Any help would be greatly appreciated.
    >
    > Thanks in advance
    >
    > Mike
    >
    >
    >
    >
    Erik Lord
    http://www.capemedia.net
    Adobe Community Expert - Authorware
    http://www.adobe.com/communities/experts/
    http://www.awaretips.net -
    samples, tips, products, faqs, and links!
    *Search the A'ware newsgroup archives*
    http://groups.google.com/group/macromedia.authorware

  • Urgent Need for FMS Consultant

    We need to hire a consultant who is familiar with how audio
    recording works to the FMS from Flash. We have a web application
    that needs to capture a users recording completely however when the
    bandwidth is very low (<33kbps) or the latency is higher than
    250ms often the audio files are cutoff at the beginning. We've set
    the audio buffer to 30 seconds and have no idea why the audio flv
    files which get recorded to the FMS server are cut off for 5, 10 or
    15 seconds. This doesn't happen with higher bandwidth and low
    latency. We're using the same basic code that's in Adobe's
    Tutorial_list demo. And we've added code to wait and flush the
    audio buffer should it still be pushing data to the server. However
    the problem with the beginning of the files is a real problem for
    us. We would like to higher a consult who is well versed in this
    capability and can help us understand why it's happening and
    whether there is any change that we can make to our code to ensure
    that the files get uploaded without any part of it cutoff. You can
    contact me at [email protected] Thank you

    1. Please record the transaction which you need to change the data in Co02 (Shop Order/Prod. Order)
    2. Create BDC program as normally you do it for normal BDC programs..
    Smaple Code with Recording.
    clear: bdcdata,messtab.
      perform bdc_dynpro using: 'SAPLCOKO1' '0110'.
      perform bdc_field using: 'CAUFVD-AUFNR' t_aufk-aufnr.
      perform bdc_field using: 'R62CLORD-FLG_OVIEW' 'X'.
      perform bdc_field using: 'BDC_OKCODE' '/00'.
      perform bdc_dynpro using: 'SAPLCOKO1' '0115'.
      perform bdc_field using: 'BDC_SUBSCR' 'SAPLCOKO1'.
      perform bdc_field using: 'BDC_OKCODE' '=KOWE'.
      perform bdc_dynpro using: 'SAPLCOKO1' '0115'.
      perform bdc_field using: 'BDC_SUBSCR' 'SAPLCOKO1'.
      perform bdc_field using: 'BDC_CURSOR' 'AFPOD-INSMK'.
       perform bdc_field using: 'AFPOD-INSMK' 'S'.
      perform bdc_field using: 'BDC_OKCODE' '=BU'.
      call transaction 'CO02' using bdcdata mode 'A'
                                            update 'S'
                                            messages into messtab.
    Thanks,

  • Urgent need for Free Goods configuration

    Hi,
         i need a document which have steps to configure free goods.
    i created a condition record using VBN3 using condition NA00 but free goods doesn't come.
    Requirement is
    Customer buys 10 items whose item catg is TAN and 1 item is free.  so cust pays only for 9 items.
    free good is not coming as sub item. i got stuck. please help .
    anybody plz send document which have steps to configure.
    my email id is [email protected]
    Thanks
    Afsar

    Free Goods Determination in Sales Order
    Free goods has the following limitations:
    - Free goods can only be supported on a 1:1 ratio. This means that an order item can lead to a free goods item. Agreements in the following form are not supported: ‘With material 1, material 2 and material 3 are free of charge‘ or ‘If material 1 and material 2 are ordered at the same time, then material 3 is free of charge‘.
    - Free goods are not supported in combinations with material structures (for example, product selection, BOM, variants with BOM explosion).
    - Free goods are only supported for sales orders with document category C (for example, not quotations).
    - Free goods are not supported for deliveries without reference to a sales order.
    - Free goods cannot be used in make-to-order production, third-party order processing and scheduling agreements.
    - If you defined a free goods for variants in a generic article (only SAP Retail), you can only process the variants in the purchase order and goods receipt individually (as single articles). In other words, you cannot process them using the generic article matrix.
    4.6x
    Not all Sales Order can be used for free goods determination.  You have to check the SD document category if it does not work.  Only category 'C' are supported.  Check transaction VOV8.
    Assume that you want to configure an inclusive FREE goods routine.  Customers must order a minumum quantity of 5 before any free goods can be assign.  For every quantity of 3, the customer will be given 1 free goods.
    WC07 - Maintain Number Range Intervals
    e.g.
    No   From number       To number
    01    0000010000         0000099999
    IMG -> Sales and Distribution -> Basic Functions -> Free Goods ->
    Maintain Access Sequences
    New Entries
    Acsq
    NA00
    Save
    Maintain Condition Types
    New Entries
    Ctyp   Name             AcSq
    FREE  Free Goods    NA00
    Save
    Maintain Pricing Procedures
    Procedures
    New Entries
    Procedure   Description
    FREE           Free Goods
    Select Procedure FREE then click Control data
    Step   Cntr   Ctyp
    10       10      FREE
    V/N6 - Activate Free Goods Determination
    Assign Order Type OR with Document Procedure A with Procedure FREE
    VBN1 - Create free goods determination
    e.g.  FREE inclusive
    Material  Min qty   From   are free good   Calc Rule   Free Goods
                           5           3                1                      1                1
    In this example, if you create a Sales Order for a quantity of 10, SAP will prompt you 7 as the customer order qty and 3 will be free.  Customer only pay for the 7 quantity.
    Free goods –
    Free goods play a large role in price negotiations with your customers. As a result, free goods are determined to be placed in sales document automatically. In retail, chemical industry or consumer goods industry, it is common to provide discounts in the form of free goods.
    Inclusive Bonus Quantities – Free goods can be part of order quantity not included in the invoice (billing). This is called inclusive bonus quantity. The ordered goods and the free goods both involve the same material. The quantity units of the free goods and the ordered goods must be the same.
    Exclusive Bonus Quantities – Free goods that take the form of extra goods that are free of charge are called exclusive bonus quantities. In this case, the extra bonus quantities are not typically included in the invoice (billing). This can either be an additional quantity of the goods ordered or it can be another article. The exclusive free of goods appear in the SD document as an individual ‘free of charge’ item.
    Both types of free goods are treated in the same way in the sales order. The material that has been ordered is entered as a main item (TAN) and the free item (TANN) is automatically displayed as a sub item. The item category determines how the item is controlled later in the business process.
    The system re-reads the free goods master record in the sales order if the quantities in the main item change or if the pricing date changes. The system then deletes the sub items and re-creates them. Any manual changes to the free goods quantity are lost.
    Note: If pricing is re-run in the sales order, it does not affect the free goods determination.
    The condition technique is used for free goods. Free goods are generally regarded as a supplement to the pricing agreement for a material. You can define master records for free goods at any level such as material, customer/material, price list category/currency/material or customer hierarchy/material. The transaction code is VBN1 and condition type – NA00 which automatically gets converted into R100 during sales document processing.
    You can restrict a free goods condition master record for one level in many ways –
    a. Validity period: the condition is only valid within this period
    b. Lowest quantity: the condition comes into affect when this quantity has been exceeded.
    c. Delivery control:
    d. Calculation type:
    e. Scales
    You can process different master data with the same key for inclusive and exclusive bonus quantities at the same time. You only need to press a button to switch between two types of discount. When you enter an exclusive bonus quantity, an extra entry line appears where you can enter the free material if it is not the same as the ordered material.
    When you specify a calculation rule, you decide how the system determines the free goods quantity in the sales order from the additional and document quantities.
    a. The free goods quantity is the quantity that is calculated from the discount quantity (not the minimum quantity)
    b. Additional quantity is the quantity delivered free of charge
    c. Document quantity is the quantity entered by the person creating the sales order.
    Three calculation rules are provided by the system i.e.
    Prorated – the system calculates the free goods in right proportion to document the quantity. For example – if 20 units are offered for free for 100 units in the condition record and the customer orders 162 units, then the system calculates 162 * 20/100 (rounded off) as free goods.
    Related to units – 20 units are given for free for every 100 units ordered. In the above case the customer would only get 20 units free as he placed an order for 162 units.
    Whole units – the customer would not get any free goods if he doesn’t match the exact quantity proposed. That is, in the above case, the customer doesn’t get any free goods as the ordered quantity did not match 100 units. Anything below or over the mark will not be qualified for a free good.
    Calculation rules are stored in the system in the form of ABAP/4 code. You can also define your own rules by using transaction code VOFM (system modifications).
    The free goods determination procedure contains a list of condition types for the free goods. One access sequence is assigned to each condition type and each access sequence contains one ore more accesses and each access contains exactly one table. This represents the search key that the system uses to search for valid condition records.
    The free goods determination procedure is assigned to sales area + document pricing procedure + customer pricing procedure just as in the case of pricing procedure assignment as free goods are generally regarded as a supplement to the pricing agreement for a material.
    If the search is successful, the system generates a sub item for free goods in the document. The item category is assigned with the item category usage FREE.
    You can activate an analysis of the free goods determination in the sales document. The system then displays detailed information on how the free goods were determined.
    Reward points if useful
    Message was edited by:
            SHESAGIRI GEDILA

  • Urgent Need for Freeing space on time machine

    unable to free space on time machine for backups. Unable to see option to delete various backups by right clicking on the file name in the list on the right side of the screen. I clicked on the "gear icon" on the actual picture of the backup in Time Machine and selected "delete" for about a year's worth of backups. Those no longer show up in the list on the right side of the Time Machine screen, but it still indicates that I have only 30 GB available on the disk. [I have only 9GB left on my Macbook 5,1 and I am wanting to upgrade the hard drive and RAM, but I cannot back up my Macbook before upgrading the HD]. If anyone can help with this I will greatly appreciate it.

    Hi, and welcome to the forums.
    Normally there's no reason to manually delete backups. When it runs out of room, Time Machine will do that automatically.
    When Time Machine backups are done over a network, they're placed in a rather odd container called a +sparse bundle disk image.+ It grows in size when things are added, but it doesn't shrink automatically when things are deleted.
    But you can "compact" it manually, if you really want, to recover the space. See the pink box in #12 of Time Machine - Frequently Asked Questions.

  • Urgent need for C6500-fpd-pkg.151-1.sy1.pkg

    Hi everybody,
    Problem:  I've recently got a new C6506E along with an ASASM for a client. But unfortunately during the boot-up process, the switch powers ASASM down and alerts of a software incompatibility! and it needs a FPD package that doesn't exist:  c6500-fpd-pkg.151-1.sy1.pkg Well, obviously I have no service contract available now to download the image from Cisco.
    Request:  Is there anybody to help me and share the mentioned image file with me?  I really need to make the switch and firewall operational very soon. 
    Regards,
    - Ali

    Jouni,
    Yes, I got disappointed when I faced this problem at the first place of setup procedure and the FPD image was missing!
    Albeit Cisco Support is a good and useful option, but I believe all products should get operational at first with no support service!
    Anyway, if there is anybody who can help me to obtain that c6500-fpd-pkg.151-1.sy1.pkg image file, then he/she can writes to my email address, in case this forum is not the place to share Cisco files online! 
    Regards,
    - Ali

  • Urgent need for Tutorials Financials, Purchasing & Distribution/Logistics

    Hi all,
    This post is off the topic, but since it was urgent, thought this might be helpful..
    If you could guide me towards any tutorial for the Financials, Purchasing and Distribution/Logistics Modules it would be great.
    I have an metalink id and i tried searching in it, but couldnt get anything like a tutorial.
    I remember once seeing a side with couple of PDFs for some modules, explaining the business process/workflow for the above modules. I dont have the site url now :-(
    If someone could help, it would be great.

    http://www.oracle.com/technology/documentation/applications.html for apps
    or
    lookup note 150230.1 for access to the Technical resource manuals.

  • Split Valuation Config dcument & end user manual(urgent,needed for support

    Hi ,
    Can anyone provide me with the cnfig doc of split valuation & also end user manual for it.
    I will award 10 points definately.
    My id is :
    ashishkhurana22 at the rate gmail
    Its urgent.
    Regards
    Ashish

    check the following:
    http://www.sap-img.com/mm025.htm
    http://www.sap123.com/showthread.php?t=29
    http://www.sapficoconsultant.com/Bonus/Split%20Valuation%20configuration.pdf
    regards,
    indranil
    Edited by: INDRANIL BHATTACHARYYA on Jun 19, 2008 2:48 PM

  • Urgent Need for creating 100 tables in Oracle.

    Hello All,
    I need to create 100 tables in oracle using a loop.
    Please suggest . Advance thanks for your efforts.
    ANto

    I am getting the foll error at run time when executing the procedure ..
    ERROR at line 1:
    ORA-01031: insufficient privileges
    ORA-06512: at "ORAUSER.CREATE_100_TABLE", line 9
    ORA-06512: at line 1
    The script goes here ...
    create or replace procedure create_100_table
    is
    v_sql_string varchar2(200);
    begin
    for i in 1..100
    loop
    v_sql_string := 'create table ajames' || i || ' as select * from emp';
    execute immediate v_sql_string;
    end loop;
    end;
    ------------------------

  • How to apply reader rights for adding comments and marks?

    Hi gurus,
    is it possible to allow user to use the comments and marks tools when working with interactive form?
    thanks and best regards.
    Jun

    hi,
    when you run the application .
    when your pdf gets displayed.
    in the acrobat reader itself,  in the acrobat toolbar....
    there is a colorful button<option> that has a cloud, a ^ sign, and a dialog box like graphics.
    when you click on that it has several options for commenting.
    check it out i have never worked on it though.
    i hope this helps,
    regards,
    -ag.

  • Urgent need for Study Materials for 1Z0-114 certification

    Hi All,
    I would be taking up the Oracle SOA Foundations, Adoption and Implementation(1Z0-114) certification next month. For study materials & free dumps I did some search over the net but with no luck yet. Can somebody please point me towards the right direction from where i can get these. Also for reference which text books should i follow? Many thanks..
    Regards,
    Tripz

    >
    Hi All,>
    I would be taking up the Oracle SOA Foundations, Adoption and Implementation(1Z0-114) certification next month. For study materials & free dumps I did some search over the net but with no luck yet. Can somebody please point me towards the right direction from where i can get these. Also for reference which text books should i follow? Many thanks..>
    Regards,
    TripzThe first thing the certification candidate needs to understand is there is basically no such thing as right direction and +(brain)dumps
    The dumps to be found on the net, and from most non approved supplied, are non authorized learning material:
    See: [http://blogs.oracle.com/certification/2009/05/the_route_you_choose.html]
    So if you use or continue to search for dumps you will be cheating.
    The post {message:id4015916} seems to refer to some useful books.
    The thread {thread:id=833598} appears to be useful, and has been reviewed by the Certification forum moderator.
    Edited by: bigdelboy on 02-Feb-2010 22:40 (typos)

  • A Plea to my Fellow SpiceHeads: Urgent Need for H1B Visa Transfer

    Fellow SpiceHeads,I would not normally post something like this on a public forum, but the situation at hand is becoming increasingly dire, so I would sincerely appreciate any assistance, recommendations, or other input you may be able to provide regarding the following issue.My girlfriend is currently on an H1B visa and needs to be employed to maintain her legal status in the U.S. She has been told that she will be laid off from the company where we both currently work in a few weeks, so it is getting down to the wire to find another job that will sponsor and transfer her visa before she is forced to return to India. For those of you who are not familiar with the complicated and convoluted U.S. immigration process, if she is forced to return to India, it's a bit of a toss-up whether or not she will be allowed to return. So far,...
    This topic first appeared in the Spiceworks Community

    Fellow SpiceHeads,I would not normally post something like this on a public forum, but the situation at hand is becoming increasingly dire, so I would sincerely appreciate any assistance, recommendations, or other input you may be able to provide regarding the following issue.My girlfriend is currently on an H1B visa and needs to be employed to maintain her legal status in the U.S. She has been told that she will be laid off from the company where we both currently work in a few weeks, so it is getting down to the wire to find another job that will sponsor and transfer her visa before she is forced to return to India. For those of you who are not familiar with the complicated and convoluted U.S. immigration process, if she is forced to return to India, it's a bit of a toss-up whether or not she will be allowed to return. So far,...
    This topic first appeared in the Spiceworks Community

  • Urgent Need for SAP PS Trainer in bangalore.

    Hi PS guys,
    I represent a sap training institute in basaveshwarnagar, bangalore,INDIA.
    we are urgently in need of SAP PS trainer.
    Even if, somebody has just completed course will also do.
    Contact us immediately at 0091-9901933886.
    cheers.
    santosh.
    0091-9901933886.
    Edited by: santosh koraddi on Jan 10, 2008 9:28 AM

    Hello ,
    What are the incentives ?
    Regards
    Keshav

Maybe you are looking for

  • How to catch multi language's data in MSSQL and data isn't garbled

    Hi everyone, I'm Taiwanese PHP developer, sorry for my poor English. I have 3 language's data:Simplified Chinese,Traditional Chinese, and English in our mssql2012 database. If I want to use ADODB to catch data,The Simplified Chinese and Traditional C

  • Check Refunds Authorization

    Hi All, We have a requirement at our client place- We would like to issue checks to the business partners through automatic payment program FPY1. Clerk should be able to issue the check if the amount is les than $ 500 If the amount is greater than $

  • I need a Replacement for my Radeon9600

    I am getting pixels on my desktop and it looks like my Radeon9600 has gone awry.I would like to replace it and upgrade with a better card.I have a 2004 G5 (7,2) and I need advice as to the best card for it.I am using a 25" Cinema Display. Any advice

  • 2nd email address on one account?

    looking for info on how to create a second email address for myself. I'd like to keep the existing one (my [email protected]) AND create another one for privacy ([email protected]). Where do I go to do this? Can I have incoming mails to both addresse

  • Need help understanding placement of images and text

    I am a beginner with contribute and as such contributing to our website with text and images. I may be missing something, but am having a frustrating time of including and arranging images on a page. It appears that the "drag and drop" capability is