Please Help Xml output with extra lines after removeNodeChild

Hi guys. I'm having trouble googling this out.
Here is the problem. Given an xml document. I read it on my app and manipulate it, then save it when I am done.
When I remove a child, the output files shows all the extra lines from the formatting and indent. So it looks like a big hole in the xml file after the node is removed. Here is an example
<bookshelf>
<books>
<book>
<isbn>3349583080580584308</isbn>
<author>Jon Stewart</author>
</book>
<book>
<isbn>9900909770543356488</isbn>
<author>Stephen Colbert</author>
</book>
</books>
</bookshelf>
Node parentNode = jonStewartNode.getParentNode();
parentNode.removeChild (jonStewartNode);The result of this is the following xml.
<bookshelf>
<books>
<book>
<isbn>9900909770543356488< /isbn>
<author>Stephen Colbert</author>
</book>
</books>
</bookshelf>
How can I output the xml without this extra lines?
Thanks in advance,
f(t)
PS: here is the initialization, and configuration of the TransformerFactory, and Transformer, and finally the save method.
     * Initializes factory instances and member variables.
    private void initialize(){
        try{
            //obtain a trasformer factory to save the file
            this.transformerFactory = TransformerFactory.newInstance();
            this.transformerFactory.setAttribute("indent-number", 4);
            //obtain the transforme
            this.transformer = this.transformerFactory.newTransformer();
            //setup transformer
            this.transformer.setOutputProperty(OutputKeys.METHOD, "xml");
            this.transformer.setOutputProperty(OutputKeys.INDENT, "yes");
            //this.transformer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount ", "4");
        }catch(TransformerConfigurationException tcex){
            this.logger.logException(this, "errors.storage.xml.configuringXmlTransformer", true, tcex);
     * Saves the DOM document to the XML file.
    private void saveDocument(){
        //verify that the documents is not null
        if(this.document==null)
            return;
        //sincronize document
        synchronized (this.document){
            try{
                //normalize document
                this.document.normalizeDocument();
                //get a document documentSource object out of the document
                DOMSource documentSource                = new DOMSource(this.document);
                //create the file output stream
                FileOutputStream fileOutputStream       = new FileOutputStream( this.file);
                //create the output stream writer
                OutputStreamWriter outputStreamWriter   = new OutputStreamWriter(fileOutputStream);
                //create the stream streamResult out to the file Stream
                StreamResult streamResult               = new StreamResult(outputStreamWriter);
                //performe the trasformation
                transformer.transform(documentSource, streamResult);
                //clean up
                outputStreamWriter.close();
                outputStreamWriter = null;
                fileOutputStream.close();
                fileOutputStream = null;
                documentSource = null;
            } catch (TransformerConfigurationException tcex) {
                // Error generated by the parser
                // Log Error
                this.logger.logException(this, "errors.storage.xml.saveXMLRepositoryFile", true, tcex);
            } catch (TransformerException tex) {
                // Error generated by the parser
                // Log Error
                this.logger.logException(this, "errors.storage.xml.saveXMLRepositoryFile", true, tex);
            } catch (Exception ex) {
                // Unknown error
                // Log Error
                this.logger.logException(this, "errors.storage.xml.saveXMLRepositoryFile", true, ex);
    }

I have an rtf template which is used to print output in pdf format. I have a table which has many rows which displays data for each record. In order to avoid breaking the page in between the rows of a record , i have added an outer table with single row and column and pasted the data table inside it and changed the row property of outer table to 'Allow Rows to Break Across Pages' to unchecked. It works fine only if the first record set length does not exceed a full page. IF the first record expanded to more than one page, it leaves a blank page at the very first and start the record at the second page. Can you please advise how to solve this issue. Its very URGENT please..

Similar Messages

  • Please help me out with some fundamentals in BW

    Hello,
    Please guide me regarding the below mentioned questions.
    1. what is the key date in query designer.
    2. when do we perform attribute change run
        like once the master data is loaded then we perform attribute change run and load the transactional data ?
    3.what is the disadvantage of using aggregates.
    4. what is full repair options?
    please help me out with these questions

    HI,
    Repair full request :
    If you indicate a request in full update mode as a repair request, then it is able to be updated in all data targets. This is also true if they already contain data from initial runs or deltas for this DataSource / source system combination, and they have overlapping selections.
    Consequently, a repair request can be updated at any time without checking each ODS object. The system supports loading in an ODS object by using the repair request without having to check the data for overlapping or request sequencing. This is because you can also delete selectively without checking an ODS object.
    Posting such requests can lead to duplicate data records in the data target.
    Hierarchy/attribute change run after loading master data;
    When hierarchies or attributes of characteristics change, the aggregate affected by the change can be adjusted manually or calculated automatically in process chains.
    Aggregates:
    Aggregates are materialized, pre-aggregated views on InfoCube fact table data. They are independent structures where summary data is stored within separate transparent InfoCubes. The purpose of aggregates is purely to accelerate the response time of queries by reducing the amount of data that must be read in the database for a given query navigation step. In the best case, the records presented in the report will exactly match the records that were read from the database.
    Aggregates can only be defined on basic InfoCubes for dimension characteristics, navigational attributes (time-dependent and time-independent) and on hierarchy levels (for time-dependent and time-independent hierarchy structures). Aggregates may not be created on ODS objects, MultiProviders or Remote Cubes.
    Queries may be automatically split up into several subqueries, e.g for individual restricted key figures (restricted key figures sales 2001 and sales 2002). Each subquery can use one aggregate; hence, one query can involve several aggregates.
    If an aggregate has less than 15 components, BW 3.x puts each component automatically into a separate dimension that will be marked as “line item” (except package and unit dimension); these aggregates are called flat aggregates. Hence, dimension tables are omitted and SID tables referenced directly.  Flat aggregates can be rolled up on the DB server (i.e., without loading data into the application server). This accelerates the roll up (hence the upload) process.
    Disadvantage : The more aggregates exist, the more time-consuming is the roll-up process and thus the data loading process; the change run is also affected.
    Hope this info Helps.
    Thanks,Ramoji.

  • Extra line after first item in quiz questions

    I just started using Captivate 7.  I made a template with some quiz questions and there is an extra line after the 2nd radio button in the templates for multiple choice and true false questions.  Is that normal ?
    Screen shot.

    I'm experiencing the same problem, also on Captivate 7.
    The alignment is fine on the master slide, but every time I load a multiple choice or true/false question the "B" answer appears like this.
    I've tried it with every theme and the same thing is happening. I've also had the program uninstalled and reinstalled and still the error is there.
    I've searched on different forums, but no one seems to have the answer.

  • Having a xml output with custom xml tags

    Hi All,
    I have a requirement where we need to generate an xml output with a custom set of tags as given below.
    <templates>
    <list>
    <List_no></list_no>
    <List_name> </List_name>
    </List>
    </templates>
    I am not sure how to get the list part as tags within tags.
    I am able to get the output if the tag level is just one level like ,
    <templates>
    <List_no></list_no>
    <List_name> </List_name>
    </List>
    </templates>
    Does anybody know how I could get the multi-level tags. Any help would be much appreciated. Thank you all.
    -Vin

    Hi, you can FOR XML PATH for a finer degree of control over your XML.  Use the @ symbol to create attributes.  Here's a simple example:
    DECLARE @t TABLE ( rowId INT IDENTITY PRIMARY KEY, [address] VARCHAR(50), city VARCHAR(30), floor INT, suite INT, doorType VARCHAR(20) )
    INSERT INTO @t VALUES
    ( '123 Fake St', 'Springfield', 10, 512, 'Metal' )
    SELECT
    [address] AS "Address",
    city AS City,
    [floor] AS "Location/@Floor",
    suite AS "Location/@Suite",
    doorType AS "Location/@DoorType"
    FROM @t
    FOR XML PATH ('Company'), ROOT ('Companies'), ELEMENTS;

  • Please help, my music would not open after syncing to computer.

    Please help, my music would not open after syncing to computer.

    Try quitting the music app completely and restart your iPad.
    Go to the home screen first by tapping the home button. Double tap the home button and the task bar will appear with all of your recent/open apps displayed at the bottom. Tap and hold down on any app icon until it begins to wiggle. Tap the minus sign in the upper left corner of the app that you want to close. Tap the home button or anywhere above the task bar. Restart the iPad.
    Restart the iPad by holding down on the sleep button until the red slider appears and then slide to shut off. To power up hold the sleep button until the Apple logo appears and let go of the button.
    If that didn't help - reboot your iPad. Reboot the iPad by holding down on the sleep and home buttons at the same time for about 10-15 seconds until the Apple Logo appears - ignore the red slider - let go of the buttons.
    If that doesn't work, there may be a corrupt song in your Music app that you have to find and remove.

  • My iPhone 6 ear speaker is not working properly I couldn't able to hear any thing from ear speaker to lissen I had to put on loud speaker or to use handsfree please help me out with this problem if some body have answer?

    My iPhone 6 ear speaker is not working properly I couldn't able to hear any thing from ear speaker to listen I had to put on loud speaker or to use hands free please help me out with this problem if some body have answer?

    Hi Venkata from NZ,
    If you are having an issue with the speaker on your iPhone, I would suggest that you troubleshoot using the steps in this article - 
    If you hear no sound or distorted sound from your iPhone, iPad, or iPod touch speaker - Apple Support
    Thanks for using Apple Support Communities.
    Best,
    Brett L 

  • HT4972 the apps weve downloaded are not working.  please help,  extremely frustrated with our ipod 4

    the apps we have downloaded are not working,  please help,  extremely frustrated with our ipod 4

    See my previous reply for for the apps closing.
    For the wifi problem:
    Does the iOS device connect to other networks?
    Does the iOS device see the network?
    Any error messages?
    Do other devices now connect?
    Did the iOS device connect OK before?
    Try the following to rule out a software problem:                 
    - Reset the iOS device. Nothing will be lost
    Reset iOS device: Hold down the On/Off button and the Home button at the same time for at
    least ten seconds, until the Apple logo appears.
    - Power off and then back on your router
    .- Reset network settings: Settings>General>Reset>Reset Network Settings
    - iOS: Troubleshooting Wi-Fi networks and connections
    - Wi-Fi: Unable to connect to an 802.11n Wi-Fi network       
    - iOS: Recommended settings for Wi-Fi routers and access points
    - Restore from backup. See:
    iOS: How to back up
    - Restore to factory settings/new iOS device.
    If still problem make an appointment at the Genius Bar of an Apple store since it appears you have a hardware problem.
    Apple Retail Store - Genius Bar

  • I'm in trouble, my iPod Touch is giving 4th shock when recharge and the battery does not last any more. who knows or has a similar problem, please help me. Note: all this after I downloaded the new version OS5.

    I'm in trouble, my iPod Touch is giving 4th shock when recharge and the battery does not last any more. who knows or has a similar problem, please help me. Note: all this after I downloaded the new version OS5.

    I would make an appointment at the Genius Bar of an Apple store because of the shock issue. I doubt it was caused by the update.

  • Firefox is not able load any websites but others programs can. i tried everything given in the support forum but nothing worked out. so can you please help me out with it?

    firefox is not able to load any websites... i tried everything given in the support forum under the topic firefox is not able to load any websites but other programs can.. but still i am facing the same problem. so please help me out with this issue!!

    firefox is not able to load any websites... i tried everything given in the support forum under the topic firefox is not able to load any websites but other programs can.. but still i am facing the same problem. so please help me out with this issue!!

  • Please help me out with the function code of print option in module pool

    please help me out with the function code of print option in module pool, along with CASE condition.
    regards,
    asif

    Hi
    you can use the Function module
    CALL FUNCTION 'GET_PRINT_PARAMETERS'
      EXPORTING
        destination            = 'LP01'                       "'Printer name
        list_name              = 'TEST'
        list_text              = 'SUBMIT ... TO SAP-SPOOL'
        immediately            = ' '
        line_size              = '2000'
        no_dialog              = 'X'             "pass space to Pop screen for Print option
      IMPORTING
        out_parameters         = wa_pri_params
        valid                  = w_valid.
    "next call below things
      NEW-PAGE PRINT ON NO DIALOG PARAMETERS wa_pri_params.
         "and try to Print the values inside the new-page
      NEW-PAGE PRINT OFF.
    Prabhudas

  • Pages is sending my documents in docx format, but windows unable to open them. They arrive blank or can only be read as a single line at a time. When view prior to sending the document is divided with black lines after each sentence.

    Pages is sending my documents in docx format, but windows unable to open them. They arrive blank or can only be read as a single line at a time. When viewed prior to sending, the document is divided with black lines after each sentence.

    Windows will only be able to open these if you have Word 2007+. Older versions of Word, for example Word 2003 would require a compatibility pack.
    Perhaps you can try 'Saving As' a different file type instead?
    Regards,
    Steve

  • How to access the activities created by an enduser especially when the enduser has left the organization?Please help me out with the possible solution

    How to access the activities created by an end user especially when the end user has left the organization?Please help me out with the possible solution

    Hi Ramesh,
    In the web UI we have business role IC_manger where you can search the activities based on employee responsible and you can use business transaction assignment functionality to assign those activities to any  other end user or team.
    Else you can also use Agent inbox functionality if you have configure the agent inbox for those activity.
    Hope this helps solving your query

  • Please help me to unlock the iPhone after restore ,where required me Apple ID and I forgot

    Please help me to unlock the iPhone after restore ,where required me Apple ID and I forgot
    it is locked by icloud

    Answered here:
    https://discussions.apple.com/thread/6045913?tstart=0
    Don't double post. You may not like the answer, but the answer will not change, no matter how many times you post.
    No one here can help you.

  • My apple account is disabled, please help me deal with as soon as possible!

    My apple account is disabled, please help me deal with as soon as possible!

    Change the password, but did not receive the letter to change the password

  • XML output with multiple tags in one line

    I have not done much XML exporting with SQL. Previously I had just been ending my SQL queries with
    FOR XML RAW ('Company'), ROOT ('Companies'), ELEMENTS;
    and it formatted my query nicely in an XML output. That put every column name as a tag and the cell data within the tag.
    However, now the criteria has changed on me. I need to create a tag with multiple sub tags in it.
    Example: <Location Floor="10" Suite="512" DoorType="Metal">
    But I'll still need other tags to be normal in the XML output such as
    <Address>123 Fake St</Address>
    <City>Springfield</City>
    <Location Floor="10" Suite="512" DoorType="Metal">
    Is there any way to get this XML mixed in the output like above?
    Thank you for any help. 

    Hi, you can FOR XML PATH for a finer degree of control over your XML.  Use the @ symbol to create attributes.  Here's a simple example:
    DECLARE @t TABLE ( rowId INT IDENTITY PRIMARY KEY, [address] VARCHAR(50), city VARCHAR(30), floor INT, suite INT, doorType VARCHAR(20) )
    INSERT INTO @t VALUES
    ( '123 Fake St', 'Springfield', 10, 512, 'Metal' )
    SELECT
    [address] AS "Address",
    city AS City,
    [floor] AS "Location/@Floor",
    suite AS "Location/@Suite",
    doorType AS "Location/@DoorType"
    FROM @t
    FOR XML PATH ('Company'), ROOT ('Companies'), ELEMENTS;

Maybe you are looking for