Does removing white space in code lower SWF size?

Hi --
I am working on a Flash project where file size optimization
is critical. I
am curious if removing white space from the code (which
lowers the size of
the AS file) will reduce the size of the finished SWF or if
the Flash
compiler already does this?
Thanks
Rich

Hey --
Thanks for the response. Based on some minimal testing I have
done I think
you are correct.
Rich
"benjiemoss" <[email protected]> wrote in
message
news:ggjjtd$krh$[email protected]..
> I'm fairly certain that it makes no difference, the
white space is only
> there for authoring.
>
> Happy to be corrected though if I'm wrong...

Similar Messages

  • How to remove white spaces from XML content using Coldfusion?

    Hi,
    Can anybody help me in removing white spaces in between the tags from the below XML content using coldfusion?
    XML content:
    <?xml version="1.0" encoding="UTF-8"?> <chart showdates="true" today="08/12/2009"> <phases> <phase color="CCFFCC" name="Funded"/> <phase color="CDCD67" name="Concept"/> <phase color="99CCFF" name="Feasibility"/> <phase color="0099FF" name="Development"/> <phase color="0099FF" name="Development"/> <phase color="CC99FF" name="Close-out"/> <phase color="909090" name="Sustaining"/> </phases><program name=""> <project enddate=" 30/03/2007 " id="43250" startdate=" 28/02/2006 "> <version enddate=" 30/03/2007 " number=" 1" startdate=" 28/02/2006 "> <phase color="CCFFCC" currentdate="23/03/2006" name="Project Start" plandate="28/02/2006" type="phase"/> <phase color="99CCFF" currentdate="04/04/2006" name="Feasibility Closure" plandate="31/05/2006" type="phase"/> <phase color="0099FF" currentdate="29/03/2007" name="Commercialization" plandate="30/12/2006" type="phase"/> <phase color="CC99FF" currentdate="30/03/2007" name="Project Closed" plandate="30/03/2007" type="phase"/> <phase color="909090" currentdate="" name="Obsolescence" plandate="" type="phase"/> </version> </project> </program> </chart>
    Output I am expecting is like below,
    <?xml version="1.0" encoding="UTF-8"?><chart showdates="true" today="08/12/2009"><phases><phase color="CCFFCC" name="Funded"/><phase color="CDCD67" name="Concept"/><phase color="99CCFF" name="Feasibility"/><phase color="0099FF" name="Development"/><phase color="0099FF" name="Development"/><phase color="CC99FF" name="Close-out"/><phase color="909090" name="Sustaining"/></phases><program name=""><project enddate=" 30/03/2007 " id="43250" startdate=" 28/02/2006 "><version enddate=" 30/03/2007 " number=" 1" startdate=" 28/02/2006 "><phase color="CCFFCC" currentdate="23/03/2006" name="Project Start" plandate="28/02/2006" type="phase"/><phase color="99CCFF" currentdate="04/04/2006" name="Feasibility Closure" plandate="31/05/2006" type="phase"/><phase color="0099FF" currentdate="29/03/2007" name="Commercialization" plandate="30/12/2006" type="phase"/><phase color="CC99FF" currentdate="30/03/2007" name="Project Closed" plandate="30/03/2007" type="phase"/><phase color="909090" currentdate="" name="Obsolescence" plandate="" type="phase"/></version> </project></program></chart>
    Thanks in advance,
    Regards,
    Manoz.

    Daverms,
    Thanks for the quick turn around..
    I have applied the solution what you suggested above (<cfprocessingdrirective suppresswhitespaces="yes"), still whitespaces are existing in my output.
    The output what I am getting is,
    (blue color part is my output & red color indicates whitespaces)
    <?xml version="1.0" encoding="UTF-8"?>
    <chart showdates="true" today="09/12/2009">
    <phases>
    <phase color="CCFFCC" name="Funded"/>
    <phase color="CDCD67" name="Concept"/>
    <phase color="99CCFF" name="Feasibility"/>
    <phase color="0099FF" name="Development"/>
    <phase color="0099FF" name="Development"/>
    <phase color="CC99FF" name="Close-out"/>
    <phase color="909090" name="Sustaining"/>
    </phases>
    <program name="">
    <project enddate=" 01/01/2010 " id="12059" startdate=" 20/06/2003 ">
    <version enddate=" 01/01/2010 " number=" 1" startdate=" 20/06/2003 ">
            <phase color="CCFFCC" currentdate="20/06/2003" name="Project Start" plandate="20/06/2003" type="phase"/>
            <phase color="CDCD67" currentdate="" name="Concept Closure" plandate="" type="phase"/>
            <phase color="99CCFF" currentdate="20/06/2003" name="Feasibility Closure" plandate="20/06/2003" type="phase"/>
            <phase color="F0FF00" currentdate="" name="Alpha Test" plandate="" type="milestone"/>
            <phase color="F0FF00" currentdate="26/07/2004" name="Beta Test" plandate="31/05/2004" type="milestone"/>
            <phase color="0099FF" currentdate="29/06/2005" name="Commercialization" plandate="08/12/2004" type="phase"/>
            <phase color="CC99FF" currentdate="24/02/2006" name="Project Closed" plandate="01/01/2010" type="phase"/>
            </version>
    <subproject enddate=" 16/10/2008 " id="11809" name="espWatcher Pricing Toolkit" startdate=" 01/08/2003 ">
    <version enddate=" 16/10/2008 " number=" 1" startdate=" 01/08/2003 ">
            <phase color="CCFFCC" currentdate="01/08/2003" name="Project Start" plandate="01/08/2003" type="phase"/>
            <phase color="99CCFF" currentdate="" name="Feasibility Closure" plandate="" type="phase"/>
            <phase color="0099FF" currentdate="15/06/2005" name="Commercialization" plandate="08/12/2004" type="phase"/>
            <phase color="CC99FF" currentdate="16/10/2008" name="Project Closed" plandate="16/10/2008" type="phase"/>
            </version>
    </subproject>
    <subproject enddate=" 31/12/2070 " id="35704" name="espWatcher version 2 (2005)" startdate=" 01/01/2005 ">
    <version enddate=" 31/12/2070 " number=" 1" startdate=" 01/01/2005 ">
            <phase color="CCFFCC" currentdate="01/01/2005" name="Project Start" plandate="01/01/2005" type="phase"/>
            <phase color="99CCFF" currentdate="01/07/2005" name="Feasibility Closure" plandate="01/07/2005" type="phase"/>
            <phase color="0099FF" currentdate="31/03/2006" name="Commercialization" plandate="31/03/2006" type="phase"/>
            <phase color="CC99FF" currentdate="31/12/2070" name="Project Closed" plandate="31/12/2070" type="phase"/>
            </version>
    </subproject>
    </project>
    </program>
    </chart>
    However this solution removes most of the whitespaces, I want exact output as flash file is expecting so..
    Where ever I am calling the CF functions, there I am getting the whitespaces. like below cases.
    startdate="#getProjectStartDate(sProjectIdList)#" -> output I am getting for this statement is -> " 12/09/2009 "
    Please assist me...
    Regards,
    Manoz.

  • How to remove white space between two answer reports

    How to remove white space between two answer reports
    In Dashboard section I have 2 rqeuest. Each request renders Table View. When I display dashboard, it show white space separating the 2 table views. How do I get rid of the white space/white band ?

    See this link
    Re: Eliminating the space between two reports in OBIEE dashboard page Section
    Regards,
    Sandeep

  • Removing white space after Spry Menu Bar...

    I having a bit of a problem trying to remove a little white space after my Spry Menu bar, when I set it to 8.6em theres a little white space, when I set the width to 9.7 it goes too far, I changed it to 137 pixels, however in Firefox and IE, it messes up the layout.
    Also what do you do if there a different browsers, where some layouts are out of place, do you need to detect the browser with JS?

    The website is not live yet, everything is stored locally so heres the code: -
    HTML: -
    <!DOCTYPE HTML>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <link rel="stylesheet" type="text/css" href="website_style.css" />
    <title>My Website</title>
    <script src="SpryAssets/SpryMenuBar.js" type="text/javascript"></script>
    <link href="SpryAssets/SpryMenuBarHorizontal.css" rel="stylesheet" type="text/css">
    </head>
    <body>
    <div id="wrapper">
      <div id="banner"></div>
      <div id="menu">
        <ul id="MenuBar1" class="MenuBarHorizontal">
          <li><a href="#">Home</a>      </li>
          <li><a href="#">Personal Profile</a></li>
          <li><a href="#">Education</a>      </li>
          <li><a href="#">Work Experience</a></li>
          <li><a href="#">Skills</a></li>
          <li><a href="#">Additional Info.</a></li>
          <li><a href="#">Referees</a></li>
        </ul>
      </div>
    </div>
    <script type="text/javascript">
    var MenuBar1 = new Spry.Widget.MenuBar("MenuBar1", {imgDown:"SpryAssets/SpryMenuBarDownHover.gif", imgRight:"SpryAssets/SpryMenuBarRightHover.gif"});
    </script>
    </body>
    </html>
    CSS: -
    @charset "utf-8";
    /* CSS Document */
    body{
        background-size:auto;
        background-repeat:no-repeat;
        background-color:#967255;
        padding: 5px;
    #wrapper {
        width:968px;
        background: #FFF;
        padding-left:0px;
        padding-right:0px;
        overflow:hidden;
        height: auto;
        border-top-left-radius:20px;
        border-top-right-radius:20px;
        margin:0 auto;
    #wrapper #banner {
        background-image:url(banner.gif);
        height: 100px;
        width: 968px;
        margin-left: auto;
    Spry Menu CSS: -
    @charset "UTF-8";
    /* SpryMenuBarHorizontal.css - version 0.6 - Spry Pre-Release 1.6.1 */
    /* Copyright (c) 2006. Adobe Systems Incorporated. All rights reserved. */
    LAYOUT INFORMATION: describes box model, positioning, z-order
    /* The outermost container of the Menu Bar, an auto width box with no margin or padding */
    ul.MenuBarHorizontal
        margin: 0;
        padding: 0;
        list-style-type: none;
        font-size: 100%;
        cursor: default;
        width: auto;
        font-family: abeatbyKai;
        height: auto;
        background-image: url(../paper.gif);
    /* Set the active Menu Bar with this class, currently setting z-index to accomodate IE rendering bug: http://therealcrisp.xs4all.nl/meuk/IE-zindexbug.html */
    ul.MenuBarActive
        z-index: 1000;
    /* Menu item containers, position children relative to this container and are a fixed width */
    ul.MenuBarHorizontal li
        list-style-type: none;
        font-size: 100%;
        position: relative;
        text-align: left;
        cursor: pointer;
        width: 8.68em;
        float: left;
        height: 3em;
        margin-top: 0;
        margin-right: 0;
        margin-bottom: 0em;
        margin-left: 0;
        padding-top: 0;
        padding-right: 0em;
        padding-bottom: 0;
        padding-left: 0px;
    /* Submenus should appear below their parent (top: 0) with a higher z-index, but they are initially off the left side of the screen (-1000em) */
    ul.MenuBarHorizontal ul
        margin: 0;
        padding: 0;
        list-style-type: none;
        font-size: 100%;
        z-index: 1020;
        cursor: default;
        width: 8.2em;
        position: absolute;
        left: -1000em;
    /* Submenu that is showing with class designation MenuBarSubmenuVisible, we set left to auto so it comes onto the screen below its parent menu item */
    ul.MenuBarHorizontal ul.MenuBarSubmenuVisible
        left: auto;
    /* Menu item containers are same fixed width as parent */
    ul.MenuBarHorizontal ul li
        width: 8.2em;
    /* Submenus should appear slightly overlapping to the right (95%) and up (-5%) */
    ul.MenuBarHorizontal ul ul
        position: absolute;
        margin: -5% 0 0 95%;
    /* Submenu that is showing with class designation MenuBarSubmenuVisible, we set left to 0 so it comes onto the screen */
    ul.MenuBarHorizontal ul.MenuBarSubmenuVisible ul.MenuBarSubmenuVisible
        left: auto;
        top: 0;
    DESIGN INFORMATION: describes color scheme, borders, fonts
    /* Submenu containers have borders on all sides */
    ul.MenuBarHorizontal ul
        border: 1px solid #CCC;
    /* Menu items are a light gray block with padding and no text decoration */
    ul.MenuBarHorizontal a
        display: block;
        cursor: pointer;
        background-color: #EEE;
        color: #333;
        text-decoration: none;
        background-image: url(../paper.gif);
        padding-top: 0.5em;
        padding-right: 0.75em;
        padding-bottom: 1.5em;
        padding-left: 0.75em;
    /* Menu items that have mouse over or focus have a blue background and white text */
    ul.MenuBarHorizontal a:hover, ul.MenuBarHorizontal a:focus
        background-color: #33C;
        color: #FFF;
    /* Menu items that are open with submenus are set to MenuBarItemHover with a blue background and white text */
    ul.MenuBarHorizontal a.MenuBarItemHover, ul.MenuBarHorizontal a.MenuBarItemSubmenuHover, ul.MenuBarHorizontal a.MenuBarSubmenuVisible
        background-color: #33C;
        color: #FFF;
    SUBMENU INDICATION: styles if there is a submenu under a given menu item
    /* Menu items that have a submenu have the class designation MenuBarItemSubmenu and are set to use a background image positioned on the far left (95%) and centered vertically (50%) */
    ul.MenuBarHorizontal a.MenuBarItemSubmenu
        background-image: url(SpryMenuBarDown.gif);
        background-repeat: no-repeat;
    /* Menu items that have a submenu have the class designation MenuBarItemSubmenu and are set to use a background image positioned on the far left (95%) and centered vertically (50%) */
    ul.MenuBarHorizontal ul a.MenuBarItemSubmenu
        background-image: url(SpryMenuBarRight.gif);
        background-repeat: no-repeat;
        background-position: 95% 50%;
    /* Menu items that are open with submenus have the class designation MenuBarItemSubmenuHover and are set to use a "hover" background image positioned on the far left (95%) and centered vertically (50%) */
    ul.MenuBarHorizontal a.MenuBarItemSubmenuHover
        background-image: url(SpryMenuBarDownHover.gif);
        background-repeat: no-repeat;
        background-position: 95% 50%;
    /* Menu items that are open with submenus have the class designation MenuBarItemSubmenuHover and are set to use a "hover" background image positioned on the far left (95%) and centered vertically (50%) */
    ul.MenuBarHorizontal ul a.MenuBarItemSubmenuHover
        background-image: url(SpryMenuBarRightHover.gif);
        background-repeat: no-repeat;
        background-position: 95% 50%;
    BROWSER HACKS: the hacks below should not be changed unless you are an expert
    /* HACK FOR IE: to make sure the sub menus show above form controls, we underlay each submenu with an iframe */
    ul.MenuBarHorizontal iframe
        position: absolute;
        z-index: 1010;
        filter:alpha(opacity:0.1);
    /* HACK FOR IE: to stabilize appearance of menu items; the slash in float is to keep IE 5.0 from parsing */
    @media screen, projection
        ul.MenuBarHorizontal li.MenuBarItemIE
            display: inline;
            f\loat: left;
            background: #FFF;

  • How to remove white space between sliced images ? Please help.

    I've created a site by exporting sliced images from Photoshop into Dreamweaver. Some images have a thin white line between them that I can't get rid of. I think it's because they are in a table format. There is no cell padding. Can you help me remove them? (see code below) The images I'm talking about are the horizontal buttons used in the navigation bar. Thank you in advance!
    Here is a link to the site: Site Preview
    --------------CODE---------------
    <table width="1001" height="751" border="0" align="center" cellpadding="0" cellspacing="0" id="Table_01">
        <tr>
          <td colspan="17">
            <img src="../Images/Optimized-Header.gif" width="1002" height="188" alt="logo header"></td>
          <td>
            <img src="../images/spacer.gif" width="1" height="194" alt=""></td>
          </tr>
        <tr>
          <td rowspan="2">
            <img src="../images/white-space-top-left.gif" width="44" height="45" alt=""></td>
          <td colspan="16">
            <img src="../images/Creekside-Layout-Final_03.gif" width="956" height="1" alt=""></td>
          <td>
            <img src="../images/spacer.gif" width="1" height="1" alt=""></td>
          </tr>
        <tr>
          <td colspan="3"><a href="../creekside_homepage.html"><img src="../images/about-btn1.gif" width="157" height="44" alt="about"></a></td>
          <td colspan="3"><a href="../steam_and_sauna_page.html"><img src="../images/steam-and-sauna-btn2.gif" width="233" height="44" alt="steam and sauna"></a></td>
          <td colspan="3"><a href="../creekside_hot_tubs_page.html"><img src="../images/hot-tubs-btn3.gif" width="162" height="44" alt="hot tubs"></a></td>
          <td colspan="3"><a href="../creekside_rentals_page2.html"><img src="../images/rentnals-btn4.gif" width="151" height="44" alt="rentals"></a></td>
          <td colspan="3"><a href="../creekside_contact_page.html"><img src="../images/contact-us-btn.gif" width="211" height="44" alt="contact us"></a></td>
          <td>
            <img src="../images/white-space-top-right.gif" width="42" height="44" alt=""></td>
          <td>
            <img src="../images/spacer.gif" width="1" height="44" alt=""></td>
          </tr>
        <tr>

    Your slices appear to be a little bit off. 
    Use Photoshop for images only.  Use DW to build your web pages.  Exporting HTML from graphics apps is not going to produce good cross-browser results.  It's really only for quick prototypes; not real web sites.
    See this 3 part tutorial:
    Taking a Fireworks (or Photoshop) comp to a CSS Layout in DW
    Part 1 - Initial Design
    http://www.adobe.com/devnet/dreamweaver/articles/dw_fw_css_pt1.html
    Part 2 - Markup preparation
    http://www.adobe.com/devnet/dreamweaver/articles/dw_fw_css_pt2.html
    Part 3 - Layout and CSS
    http://www.adobe.com/devnet/dreamweaver/articles/dw_fw_css_pt3.html
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists 
    http://alt-web.com/

  • Can I remove white space to "compact"

    Hi there, is there a way to remove the white space in my picture? I do *not* mean transparency. What I need is for all my coloured dots to be shifted closer together to be more compact.
    Thank-you in advance, Michelle

    The excellent Circle Fill script might be an option here, but it sounds as if the actual pattern has already been created and the request could mean something different.
    Does that apply?
    Also, which version of Illustrator are you using?

  • How to remove white spaces with GUI_Download FM

    Hi Gurus,
    I need to download my text file using GUI_DOWNLOAD FM without leading white spaces, can u pls advice me.
    I am giving the code I am using below.
    CALL FUNCTION 'GUI_DOWNLOAD'
          EXPORTING
      BIN_FILESIZE                    =
            filename                        =  l_filename
        filetype                        = 'ASC'
      APPEND                          = ' '
         WRITE_FIELD_SEPARATOR           = 'X'
      HEADER                          = '00'
         TRUNC_TRAILING_BLANKS           = 'X'
      WRITE_LF                        = 'X'
      COL_SELECT                      = ' '
      COL_SELECT_MASK                 = ' '
      DAT_MODE                        = ' '
      CONFIRM_OVERWRITE               = ' '
      NO_AUTH_CHECK                   = ' '
      CODEPAGE                        = ' '
      IGNORE_CERR                     = ABAP_TRUE
      REPLACEMENT                     = '#'
      WRITE_BOM                       = ' '
      TRUNC_TRAILING_BLANKS_EOL       = 'X'
      WK1_N_FORMAT                    = ' '
      WK1_N_SIZE                      = ' '
      WK1_T_FORMAT                    = ' '
      WK1_T_SIZE                      = ' '
      WRITE_LF_AFTER_LAST_LINE        = ABAP_TRUE
      SHOW_TRANSFER_STATUS            = ABAP_TRUE
    IMPORTING
      FILELENGTH                      =
          TABLES
            data_tab                        = gt_temp
      FIELDNAMES                      =
       EXCEPTIONS
         FILE_WRITE_ERROR                = 1
         NO_BATCH                        = 2
         GUI_REFUSE_FILETRANSFER         = 3
         INVALID_TYPE                    = 4
         NO_AUTHORITY                    = 5
         UNKNOWN_ERROR                   = 6
         HEADER_NOT_ALLOWED              = 7
         SEPARATOR_NOT_ALLOWED           = 8
         FILESIZE_NOT_ALLOWED            = 9
         HEADER_TOO_LONG                 = 10
         DP_ERROR_CREATE                 = 11
         DP_ERROR_SEND                   = 12
         DP_ERROR_WRITE                  = 13
         UNKNOWN_DP_ERROR                = 14
         ACCESS_DENIED                   = 15
         DP_OUT_OF_MEMORY                = 16
         DISK_FULL                       = 17
         DP_TIMEOUT                      = 18
         FILE_NOT_FOUND                  = 19
         DATAPROVIDER_EXCEPTION          = 20
         CONTROL_FLUSH_ERROR             = 21
         OTHERS                          = 22
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.

    hi , try this,
    REPORT  ZMP_SALES_HEDER_DOWLNLOAD.
    types:begin of ty_vbak,
          vbeln type vbeln,
          erdat type erdat,
          ernam type ernam,
          netwr type netwr_ak,
          vkorg type vkorg,
          kunnr type kunnr,
          end of ty_vbak.
    data:it_vbak type table of ty_vbak,
         wa_vbak type ty_vbak.
    select-options:s_vbeln for wa_vbak-vbeln.
    start-of-selection.
    select vbeln
            erdat
            ernam
            netwr
            vkorg
            kunnr from vbak
            into table it_vbak
            where vbeln in s_vbeln.
       CALL FUNCTION 'GUI_DOWNLOAD'
         EXPORTING
    *      BIN_FILESIZE                    =
           FILENAME                        = 'C:/temp.XLS'
    *      FILETYPE                        = 'ASC'
    *      APPEND                          = ' '
          WRITE_FIELD_SEPARATOR           = 'X'
    *      HEADER                          = '00'
    *      TRUNC_TRAILING_BLANKS           = ' '
    *      WRITE_LF                        = 'X'
    *      COL_SELECT                      = ' '
    *      COL_SELECT_MASK                 = ' '
    *      DAT_MODE                        = ' '
    *      CONFIRM_OVERWRITE               = ' '
    *      NO_AUTH_CHECK                   = ' '
    *      CODEPAGE                        = ' '
    *      IGNORE_CERR                     = ABAP_TRUE
    *      REPLACEMENT                     = '#'
    *      WRITE_BOM                       = ' '
    *      TRUNC_TRAILING_BLANKS_EOL       = 'X'
    *      WK1_N_FORMAT                    = ' '
    *      WK1_N_SIZE                      = ' '
    *      WK1_T_FORMAT                    = ' '
    *      WK1_T_SIZE                      = ' '
    *    IMPORTING
    *      FILELENGTH                      =
         TABLES
           DATA_TAB                        = IT_VBAK
    *      FIELDNAMES                      =
    *    EXCEPTIONS
    *      FILE_WRITE_ERROR                = 1
    *      NO_BATCH                        = 2
    *      GUI_REFUSE_FILETRANSFER         = 3
    *      INVALID_TYPE                    = 4
    *      NO_AUTHORITY                    = 5
    *      UNKNOWN_ERROR                   = 6
    *      HEADER_NOT_ALLOWED              = 7
    *      SEPARATOR_NOT_ALLOWED           = 8
    *      FILESIZE_NOT_ALLOWED            = 9
    *      HEADER_TOO_LONG                 = 10
    *      DP_ERROR_CREATE                 = 11
    *      DP_ERROR_SEND                   = 12
    *      DP_ERROR_WRITE                  = 13
    *      UNKNOWN_DP_ERROR                = 14
    *      ACCESS_DENIED                   = 15
    *      DP_OUT_OF_MEMORY                = 16
    *      DISK_FULL                       = 17
    *      DP_TIMEOUT                      = 18
    *      FILE_NOT_FOUND                  = 19
    *      DATAPROVIDER_EXCEPTION          = 20
    *      CONTROL_FLUSH_ERROR             = 21
    *      OTHERS                          = 22
       IF SY-SUBRC = 0.
       MESSAGE 'DATA ULOADED TO temp FILE' TYPE 'I'.
       ENDIF.

  • Remove white space nodes from jtree

    I am trying to create jtree using XML DOM.
    But I m not able to remove/ignore the white space elements from DOM.
    I am getting output something like this
    for example
    Server
    Text
    node1
    Text
    I want something like this.
    Server
    node1
    I tried all option for removeing the white space
    Here I am posting the source
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.DocumentBuilderFactory;
    import javax.xml.parsers.FactoryConfigurationError;
    import javax.xml.parsers.ParserConfigurationException;
    import org.xml.sax.SAXException;
    import org.xml.sax.SAXParseException;
    import java.io.File;
    import java.io.IOException;
    import org.w3c.dom.Document;
    import org.w3c.dom.DOMException;
    // Basic GUI components
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    import javax.swing.JScrollPane;
    import javax.swing.JTree;
    // GUI components for right-hand side
    import javax.swing.JSplitPane;
    import javax.swing.JEditorPane;
    // GUI support classes
    import java.awt.BorderLayout;
    import java.awt.Dimension;
    import java.awt.Toolkit;
    import java.awt.event.WindowEvent;
    import java.awt.event.WindowAdapter;
    // For creating borders
    import javax.swing.border.EmptyBorder;
    import javax.swing.border.BevelBorder;
    import javax.swing.border.CompoundBorder;
    // For creating a TreeModel
    import javax.swing.tree.*;
    import javax.swing.event.*;
    import java.util.*;
    public class DomEcho02 extends JPanel
    // Global value so it can be ref'd by the tree-adapter
    static Document document;
    static final int windowHeight = 460;
    static final int leftWidth = 300;
    static final int rightWidth = 340;
    static final int windowWidth = leftWidth + rightWidth;
    public DomEcho02()
    // Make a nice border
    EmptyBorder eb = new EmptyBorder(5,5,5,5);
    BevelBorder bb = new BevelBorder(BevelBorder.LOWERED);
    CompoundBorder cb = new CompoundBorder(eb,bb);
    this.setBorder(new CompoundBorder(cb,eb));
    // Set up the tree
    JTree tree = new JTree(new DomToTreeModelAdapter());
    // Iterate over the tree and make nodes visible
    // (Otherwise, the tree shows up fully collapsed)
    //TreePath nodePath = ???;
    // tree.expandPath(nodePath);
    // Build left-side view
    JScrollPane treeView = new JScrollPane(tree);
    treeView.setPreferredSize(
    new Dimension( leftWidth, windowHeight ));
    // Build right-side view
    JEditorPane htmlPane = new JEditorPane("text/html","");
    htmlPane.setEditable(false);
    JScrollPane htmlView = new JScrollPane(htmlPane);
    htmlView.setPreferredSize(
    new Dimension( rightWidth, windowHeight ));
    // Build split-pane view
    JSplitPane splitPane =
    new JSplitPane( JSplitPane.HORIZONTAL_SPLIT,
    treeView,
    htmlView );
    splitPane.setContinuousLayout( true );
    splitPane.setDividerLocation( leftWidth );
    splitPane.setPreferredSize(
    new Dimension( windowWidth + 10, windowHeight+10 ));
    // Add GUI components
    this.setLayout(new BorderLayout());
    this.add("Center", splitPane );
    } // constructor
    public static void main(String argv[])
    if (argv.length != 1) {
    System.err.println("Usage: java DomEcho filename");
    System.exit(1);
    DocumentBuilderFactory factory =
    DocumentBuilderFactory.newInstance();
    //factory.setValidating(true);
    //factory.setNamespaceAware(true);
    try {
    DocumentBuilder builder = factory.newDocumentBuilder();
    document = builder.parse( new File(argv[0]) );
    makeFrame();
    } catch (SAXException sxe) {
    // Error generated during parsing)
    Exception x = sxe;
    if (sxe.getException() != null)
    x = sxe.getException();
    x.printStackTrace();
    } catch (ParserConfigurationException pce) {
    // Parser with specified options can't be built
    pce.printStackTrace();
    } catch (IOException ioe) {
    // I/O error
    ioe.printStackTrace();
    } // main
    public static void makeFrame() {
    // Set up a GUI framework
    JFrame frame = new JFrame("DOM Echo");
    frame.addWindowListener(
    new WindowAdapter() {
    public void windowClosing(WindowEvent e) {System.exit(0);}
    // Set up the tree, the views, and display it all
    final DomEcho02 echoPanel =
    new DomEcho02();
    frame.getContentPane().add("Center", echoPanel );
    frame.pack();
    Dimension screenSize =
    Toolkit.getDefaultToolkit().getScreenSize();
    int w = windowWidth + 10;
    int h = windowHeight + 10;
    frame.setLocation(screenSize.width/3 - w/2,
    screenSize.height/2 - h/2);
    frame.setSize(w, h);
    frame.setVisible(true);
    } // makeFrame
    // An array of names for DOM node-types
    // (Array indexes = nodeType() values.)
    static final String[] typeName = {
    "none",
    "Element",
    "Attr",
    "Text",
    "CDATA",
    "EntityRef",
    "Entity",
    "ProcInstr",
    "Comment",
    "Document",
    "DocType",
    "DocFragment",
    "Notation",
    // This class wraps a DOM node and returns the text we want to
    // display in the tree. It also returns children, index values,
    // and child counts.
    public class AdapterNode
    org.w3c.dom.Node domNode;
    // Construct an Adapter node from a DOM node
    public AdapterNode(org.w3c.dom.Node node) {
    domNode = node;
    // Return a string that identifies this node in the tree
    // *** Refer to table at top of org.w3c.dom.Node ***
    public String toString() {
    String s = typeName[domNode.getNodeType()];
    String nodeName = domNode.getNodeName();
    if (! nodeName.startsWith("#")) {
    s += ": " + nodeName;
    if (domNode.getNodeValue() != null) {
    if (s.startsWith("ProcInstr"))
    s += ", ";
    else
    s += ": ";
    // Trim the value to get rid of NL's at the front
    String t = domNode.getNodeValue().trim();
    int x = t.indexOf("\n");
    if (x >= 0) t = t.substring(0, x);
    s += t;
    return s;
    * Return children, index, and count values
    public int index(AdapterNode child) {
    //System.err.println("Looking for index of " + child);
    int count = childCount();
    for (int i=0; i<count; i++) {
    AdapterNode n = this.child(i);
    if (child.domNode == n.domNode) return i;
    return -1; // Should never get here.
    public AdapterNode child(int searchIndex) {
    //Note: JTree index is zero-based.
    org.w3c.dom.Node node =
    domNode.getChildNodes().item(searchIndex);
    return new AdapterNode(node);
    public int childCount() {
    return domNode.getChildNodes().getLength();
    // This adapter converts the current Document (a DOM) into
    // a JTree model.
    public class DomToTreeModelAdapter
    implements javax.swing.tree.TreeModel
    // Basic TreeModel operations
    public Object getRoot() {
    //System.err.println("Returning root: " +document);
    return new AdapterNode(document);
    public boolean isLeaf(Object aNode) {
    // Determines whether the icon shows up to the left.
    // Return true for any node with no children
    AdapterNode node = (AdapterNode) aNode;
    if (node.childCount() > 0) return false;
    return true;
    public int getChildCount(Object parent) {
    AdapterNode node = (AdapterNode) parent;
    return node.childCount();
    public Object getChild(Object parent, int index) {
    AdapterNode node = (AdapterNode) parent;
    return node.child(index);
    public int getIndexOfChild(Object parent, Object child) {
    AdapterNode node = (AdapterNode) parent;
    return node.index((AdapterNode) child);
    public void valueForPathChanged(TreePath path, Object newValue) {
    // Null. We won't be making changes in the GUI
    // If we did, we would ensure the new value was really new,
    // adjust the model, and then fire a TreeNodesChanged event.
    * Use these methods to add and remove event listeners.
    * (Needed to satisfy TreeModel interface, but not used.)
    private Vector listenerList = new Vector();
    public void addTreeModelListener(TreeModelListener listener) {
    if ( listener != null
    && ! listenerList.contains( listener ) ) {
    listenerList.addElement( listener );
    public void removeTreeModelListener(TreeModelListener listener) {
    if ( listener != null ) {
    listenerList.removeElement( listener );
    // Note: Since XML works with 1.1, this example uses Vector.
    // If coding for 1.2 or later, though, I'd use this instead:
    // private List listenerList = new LinkedList();
    // The operations on the List are then add(), remove() and
    // iteration, via:
    // Iterator it = listenerList.iterator();
    // while ( it.hasNext() ) {
    // TreeModelListener listener = (TreeModelListener) it.next();
    * Invoke these methods to inform listeners of changes.
    * (Not needed for this example.)
    * Methods taken from TreeModelSupport class described at
    * http://java.sun.com/products/jfc/tsc/articles/jtree/index.html
    * That architecture (produced by Tom Santos and Steve Wilson)
    * is more elegant. I just hacked 'em in here so they are
    * immediately at hand.
    public void fireTreeNodesChanged( TreeModelEvent e ) {
    Enumeration listeners = listenerList.elements();
    while ( listeners.hasMoreElements() ) {
    TreeModelListener listener =
    (TreeModelListener) listeners.nextElement();
    listener.treeNodesChanged( e );
    public void fireTreeNodesInserted( TreeModelEvent e ) {
    Enumeration listeners = listenerList.elements();
    while ( listeners.hasMoreElements() ) {
    TreeModelListener listener =
    (TreeModelListener) listeners.nextElement();
    listener.treeNodesInserted( e );
    public void fireTreeNodesRemoved( TreeModelEvent e ) {
    Enumeration listeners = listenerList.elements();
    while ( listeners.hasMoreElements() ) {
    TreeModelListener listener =
    (TreeModelListener) listeners.nextElement();
    listener.treeNodesRemoved( e );
    public void fireTreeStructureChanged( TreeModelEvent e ) {
    Enumeration listeners = listenerList.elements();
    while ( listeners.hasMoreElements() ) {
    TreeModelListener listener =
    (TreeModelListener) listeners.nextElement();
    listener.treeStructureChanged( e );
    }

    DocumentBuilderFactory can be configured to ignore white space.
    http://java.sun.com/j2se/1.5.0/docs/api/javax/xml/parsers/DocumentBuilderFactory.html#setIgnoringElementContentWhitespace(boolean)

  • Remove White Space in JSP in Websphere 5.1

    I am look for a way to remove all the white spaces generated in all the jsp pages. Since I am not using Jsp 2.1, <%@ page trimDirectiveWhitespaces="true" %> doesn't work. Please help.

    You could do it via a servlet filter that applies itself on every response...
    Check out this link: [http://www.theserverside.com/discussions/thread.tss?thread_id=38852]
    It has a couple of potential solutions.

  • Removing White Space Around Header - from CSS?

    What is causing the white space around the header and
    above/below the top nav bar? There's also an extra white pixel
    space between each of the buttons on the top nav bar.
    See;
    http://home.roadrunner.com/~phenline/products/prods_models_9_10_07.html
    I've also attached the CSS stylesheet.
    I thought it might be a valign tag but they are all in the
    main text and are necessary to glue the 3 main sections just under
    the top nav bar. I couldn't find any vspace or hspace options in
    the code.
    Because of the rollovers on the top blue horizontal nav bar,
    I need the "class" option in each <td> tag. Otherwise, if I
    put the class="navMain" option on the <tr> tag, then the
    whole nav bar will show the rollover color. Or, I suppose I could
    create 5 different CSS styles for each nav button ???
    Any ideas? Thank you.

    HI, for first you should to revrite tables to DIV, or you can
    correct this with a CSS code for the table:
    for example you shold to check the background color to the
    same:
    .x {
    background-color: #3766c8;
    for more example about Table CSS styling you can check a good
    wizard:
    http://www.somacon.com/p141.php
    Titti
    http://textures.z7server.com/

  • Removing white spaces

    Hie Guys,
    One of the columns in my report - "Status Description" contains few lines of white spaces before the contents of the cells are displayed. Example is given below. Can anyone tell me how I can remove those white spaces (function/formula)?  Thanks.
    Project ID
    Status Description
    100
    This project will increase sales by $1.2 M. It will also help increase profit by $0.2 M
    101
    This project will increase sales by $1.5 M. It will also help increase profit by $0.5 M
    102
    This project will increase sales by $2.2 M. It will also help increase profit by $1.2 M

    "trim(status description)" did not work for me. Originally the cell contents had html tags as shown below. I used the "Read content as html" format option, but the tags did not go away. Then I used the "Read content as hyperlink" option and the tags disappeared. However, I got white spaces like I showed above.
    Project ID
    Status Description
    100
    <p>This project will increase sales by $1.2 M. It will also help increase profit by $0.2 M</p>
    101
    <p>This project will increase sales by $1.5 M. It will also help increase profit by $0.5 M</p>
    102
    <p>This project will increase sales by $2.2 M. It will also help increase profit by $1.2 M </p>
    Some cells have other html tags as well besides <p>.

  • Please help! Need to remove white space in a form.

    https://acrobat.com/app.html#d=620D971lGreChvoYewoeng
    I have uploaded part of my form. When the user checks all of the boxes they want on their form and hit the submit button, the unchecked boxes disappear...which is what  want.
    What I cannot get the form to do is remove the remaining white space within that subform so the overall form shortens. I have had my head in  this for a bit and a deadline is looming!
    Thank you to anyone in advance who can help!

    Hi Srini,
    I honestly do not know how to thank you!! You are a life saver.
    I see exactly what you did and it makes perfect sense. Thank you for providing a solution and in this manner. You helped me...and I have learned something new and very helpful.
    Best regards,
    Lea

  • GREP remove white space at start and end of paragraph

    Hi,
    Question for the GREP experts: I'd like to construct a GREP expression
    that will remove all white space at the start AND end of a paragraph in
    one go.
    What I've got so far works, but you have to run it twice to work:
    I'll try and post it at the bottom of this message, but since I'm
    posting via email it probably will come out scrambled, so I'll describe
    what I've got so far:
    Two expressions in parenthesis separated by the OR character (pipe). The
    first expression searches for one or more space, tab or white-space at
    the beginning of a paragraph.
    The second expression searches for the same at the end of the paragraph.
    Each expression is in parenthesis, and the two groups are separated, as
    I say, by an OR sign.
    However, this has to be run twice for it to work. For it removes all the
    spaces at the start of paragraphs, then when run again all the spaces at
    the end.
    Any ideas how to get it to work in one go?
    Thanks,
    Ariel
    The expression is:
    (^[ \ts]+)|([ \ts)+$)

    Arïel, your GREP appears a bit mashed up in the forum -- was it something like this?
    (^[\t\s]+)|([\t\s]+$)
    If so:
    1. "\s" is "any whitespace", so you would not need to include "\t" as well. But I would not recommend this, as a HUGE disadvantage of "\s" is it also includes hard and soft returns: double returns are seen as "any whitespace" (the first return) and then "end of line" (the second return), and the first is removed. ("Disadvantage" is subject to what you want to accomplish, by the way. I usually don't want this so I list each possible whitespace character that may be removed.)
    2. The parentheses around each 'section' of this GREP are not necessary. The OR operator is 'highest level' -- in this case, since you have an entire left part OR an entire right part, you can omit all parentheses.
    3. This works for me ...
    ^[\t ]+|[\t ]+$
    ... and despite Peter's not-too-shabby suggestion, I would still recommend using mine instead. It's easier on ID (since it only has to remove text, not "remove-and-then-insert-again" (which is exactly what using the $.. operators do), and, more importantly, there are limits to what $1 can 'pick up'. I can't recall the special circumstances, but I have had text attributes shift, and footnotes and anchored objects disappear/being mucked up/otherwise mangled.

  • Pagination Issue: Removing White Space

    If you were asked the simple question: "How do I remove blank pages?" you would likely answer: "Format | Page Layout | Pagination | Before Saving & Printing: Delete Empty Pages."
    If you were asked a variation of that question: "How do I remove partially blank pages?" some might answer: "Huh?"
    That's my question. I have this tendency to assume that a vacuum of information on the search engines means, sadly in answer to this question, "You can't remove partially blank pages."
    Before you answer, here is what I'm specifically attempting to do with FrameMaker 9:
    1)   I converted a user manual in Word 2007 to FrameMaker 9. The TOC contains several hundred headings (seven levels deep). Of course, the TOC includes chapters (heading1) at level 1, and topics (heading3 through heading7) for levels 2-7.
    2)   I converted the text and graphics under each heading (heading1 through heading7) to separate FrameMaker 9 files. (Each heading and all child sub-headings are "topics" that describe part of the UI for a software product.)
    3)   All of the converted FrameMaker 9 files were added to a FrameMaker 9 book. The TOC in this book is identical to the TOC of the original Word 2007 file.
    Each of these headings is a separate FrameMaker 9 file representing a topic mapped to the UI:
    CONSOLE MAIN SCREEN....................................... 63
    Inventory Control..................................... 81
    Intellectual Property............................. 82
    Using the Intellectual Property Page......... 83
    Viewing and Configuring................ 85
    Configuring Filters.............. 87
    View Settings.............. 88
    4)   I have linked all these files to a project in RoboHelp 8, creating a RoboHelp master page to render the help topics with exact same headers/footers in the FrameMaker 9 file. Whenever I make changes to the FrameMaker 9 files, I can open RoboHelp 8 and compile a new help project for the UI. Sweet. (It works so well, as a matter of fact, that it’s worth the cost of the Adobe Technical Communications 2 suite!)
    5)   For customers demanding a PDF version that looks EXACTLY like the previous PDF rendered in Word 2007, I print a PDF file from the FrameMaker 9 book for this user manual that looks almost exactly like the legacy PDF file rendered in Word 2007.
    Why “almost” exactly?
    As you may have guessed, if a topic ends with a paragraph at the top of the last page, there is blank space for the remainder of that page. Whereas in Word 2007, the next heading began immediately after the previous heading!
    FrameMaker 9 only has a setting on the ‘Pagination’ dialog for eliminating blank pages, not eliminating partially blank pages.
    I would like to render the PDF file, printed from the FrameMaker 9 book file, with each file in the book beginning on the line immediately after the preceding paragraph of the file before it in the book (unless the style such as heading1 dictates the line starts on a new page).
    In some cases, the last page of a topic has just three sentences, leaving the rest of the page blank. It seems to me that to do what I’m attempting, the recursive effect of starting the next file after the paragraph on the last page of the previous file in the book, would be to reduce the PDF by several (or more) pages. This would require FrameMaker 9 to adjust the page numbering of the PDF file (which would no longer coincide with page numbering for the FrameMaker 9 book files).
    This is no different of a problem than anyone with a book that contains 10 files (each file representing an entire chapter) would face. If a chapter ends with a page containing just three sentences, one would have to fiddle with the text to get those three lines to “bump” to the previous page. In the old days of technical writing, this typical pagination flaw was a thorn in my side. I had to print the document, and if the end of a chapter contained “orphaned” text (or even a small paragraph on an otherwise blank page) I had to reduce paragraph spacing to cause that rogue paragraph to bump to the previous page, eliminating the white space. I was kind of hoping that after almost three decades of computing, that basic problem was solved. In a small book with a dozen or less chapters, it’s not a real issue, but now that I have a book with several hundred files, I’m facing this dilemma for the first time.
    Suggestions, anyone? (Thanks for your patience in torturing through this message!)
    Message was edited by: holosys
    Message was edited by: holosys

    Excellent ideas; Text Insets created through File Import eloquently solved the problem!
    I created a separate book that I will use for rendering the PDF file for the user manual. In that book are files for entire chapters. In each chapter file are text insets for each heading file (which comprises an individual "topic" in RoboHelp).
    Here is what I did:
    Opened the book file containing cover, hundreds of topics and TOC, and Save Book As... [new book name] then delete all book files except for the cover and TOC.
    After opening a new (blank portrait) FrameMaker 9 file, I applied all formats from my master stylesheet file.
    Selected File | Import | Highlight the file | [Path\Name.fm of sequentially first FrameMaker 9 file in chapter] (select Import by Reference radio button) | Import. (The Import Text Flow by Reference dialog screen appears.)
    Selected defaults (Body Page Flow: A (Main Flow) | Reformat Using Current Document's Catalogs | Automatic) and additionally selected Manual Page Breaks and Other Overrides (Under Reformat Using Current Document's Catalogs) then selected Import.
    Moved the cursor to the end of the file. (This is important because the cursor is now positioned BEFORE the imported Text Inset, and the cursor needs to be positioned AFTER the imported Text Inset.)
    Repeated above steps 3-5, selecting the file containing the next heading in the chapter, until the current file contains Text Insets for all topic files.
    Save the file.
    Add the file to the book as the first chapter.
    Repeated above steps 2-8 until the book is populated with all chapters.
    Update and print to PDF.
    Problem solved: I obtained the desired results as per my original message in this thread.
    The side question was asked as to why creating a separate FrameMaker 9 file for each heading and sub-heading (as described in my original message in this thread) is necessary. The answer is simply "budget" as the start-up company where I work wants to instantaneously generate a RoboHelp Flash Help project from the FrameMaker 9 book through linking FrameMaker 9 to RoboHelp 8, which is evidently a new function. Each heading and sub-heading of the user manual correlates to a UI screen or UI component. The User Manual was authored (before I arrived on the scene) with the intent of each heading and sub-heading in the User Manual TOC documenting a UI screen or UI component.
    Therefore, instead of spending time creating a RoboHelp project in parallel, the company desired the elimination of costs associated with parallel development. Since the budget is non-existent for online help, pressing Help on any UI screen displayed a boilerplate screen instructing the customer to call customer support at a toll-free number, and a link to the PDF manual. Now, with minimal effort, the Help buttons are mapped to open the help topic for the corresponding heading in the user manual. Pressing Help opens the appropriate heading or "topic" and displays a TOC and search tabs as well (for full access to the documentation). This scheme requires little or no ongoing maintenance in RoboHelp 8 other than opening the help project, updating the links to FrameMaker 9, compiling the help project in Flash Help, and checking the help files in to Perforce for the nightly build.
    Thank you once again for saving the day!
    Message was edited by: holosys

  • Find and remove white space

    Hi,
    In Oracle, using SQL or PL/SQL, how can I find trailing white spaces (space, newline, carriage return, tab) and remove them?
    Thanks,

    If you are in Oracle 10g Regular Expressions do it nicely:
    UPDATE t1 SET c1 = REGEXP_REPLACE(c1, '[[:space:]]');
    This will remove any character considered 'space' and includes all those you listed. It also has the benefit of being portable across character sets (EBCDIC) and languages (other languages have their own space characters).
    Regards.

Maybe you are looking for