Output the element in a single line

Hi all,
I encontered a problem when using castor xml tool to gengerate an xml file.
The parser that I an using is org.exolab.castor.parser=org.apache.xerces.parsers.SAXParser.
And I set org.exolab.castor.indent=true in the castor.properties
I got the following ouput:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE subscribers PUBLIC "...
"subscriber.dtd">
<subscribers provider="..."/>
<user name="..."
pass="..."/>
</subscribers>
What I expect is that the user element should be in a single line like following:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE subscribers PUBLIC "..." "subscriber.dtd">
<subscribers provider="..."/>
<user name="..." pass="..."/>
</subscribers>
What should I do to achieve this goal?
I found there is a property which might be useful, but I don't know exactely how to use it:
org.exolab.castor.features=
thanks in advance

Hello,
I've found a solution:
We can use our own Serializer to control the output format:
In the castor.properities,
by default org.exolab.castor.serializer=org.apache.xml.serialize.XMLSerializer
I deprived this class and overrided all the constructors and the setOutputFormat method:
     public void setOutputFormat(OutputFormat arg0) {
          arg0.setIndenting(true);
          arg0.setLineWidth(0);
          super.setOutputFormat(arg0);     
and it works fine
Thanks anyway
Message was edited by:
laseine

Similar Messages

  • Add the elements of a single row/column of a matrix

    Hello everyone,
    what's the easiest way to add all the elements of a single row or column of a matrix given the matrix and the number of that row/column on LabVIEW ? The output should be a number for each row or column.
    Solved!
    Go to Solution.

    I'm assuming you are very new to LabVIEW, otherwise you would know about For loops, indexing, and the Array functions.  In many programming languages, a "matrix" is just a multi-dimension array, but in LabVIEW, it is a different representation of a multi-dimension array.
    If you are really working with a LabVIEW Matrix, the easiest way might be to convert the matrix to a 2D array and use the various Array functions to do the work.  Note that once you have the row or column isolated as a 1D array, there is a function on the Numeric palette that will add the array elements for you (so you don't need the For loop to do that).
    P.S. -- I underlined "might be", above, because I've never actually used LabVIEW's Matrix functions, but have stuck with 2 (or 3, or 4) dimension arrays.
    Bob Schor

  • Can I add multiple elements on a single line?

    Can I add multiple elements on a single line?

    Not yet. But this is something we plan to support. You can vote on this idea here: http://forums.adobe.com/ideas/1046
    We use this to help prioritize our work.
    Randy

  • How to format generated XML using XMLELEMENT() my output is coming in a single line i want it to be in a XML format

    hi I am having problem in formatting XML file which I generated with xmlelement() when I execute it gives me putput in a single line
    is there any way that I got my output as a XML file HAS......

    That is expected behavior. PRETTY print(ing) is only needed for humans. XML Parsers don't need the XML to be pretty printed. If you open the XML file in a browser like Windows Explorer or Firefox, the browser will pretty print the output for you.
    In all, the "single line" output is done because of PERFORMANCE reasons (lack of unneeded end of line and CTRL line breaks etc)
    SELECT xmlelement("Employee Name", dummy) as "XML RESULT"
    FROM DUAL;
    <Employee Name>X</Employee Name>
    SELECT xmlelement("Employee Name", xmlelement("SurName", dummy)
                                     , xmlelement("LastName", dummy)
                     ) as "XML RESULT"
    FROM DUAL;
    <Employee Name><SurName>X</SurName><LastName>X</LastName></Employee Name>
    XMLSERIALIZE can pretty print the output if needed via INDENTation
    SELECT XMLSERIALIZE(CONTENT xmlelement("Employee Name", xmlelement("SurName", dummy), xmlelement("LastName", dummy)) as CLOB indent SIZE=1 )
    FROM DUAL;
    <Employee Name>
         <SurName>X</SurName>
         <LastName>X</LastName>
    </Employee Name>

  • Sap Scripts-printing the text in a single line

    In Sap Scripts I would like to have my text in a single line. For that I have used the extended line (=) tag. But It is not working.
    Can anyone help me how can I achieve this.
    Actually how many characters I can put in a single line. I think it is 72. But my text is less than 72 characters.
    Can anyone Please help me.
    Regards
    Meshack Appikatla.

    A Text Symbol in Script or Smartform can take lenght of Maximum 80 characters. Any thing more than that will be truncated even if the window is long enoguh to hold more than 80 characters. Si your character formated need to be have the PROTECTED option checked.
    At Topic:
    Try increasing the window size in lenght or width, If that is not possible pratically, you can try by decreasing the font size.

  • How to give the parameter in a single line

    hi,
    i am working on reports, i have declared the parameter as radio button, how to have the radio button in a single line.
    somethink like this
    radiobutton1, radiobutton2, ....

    Hi Anitha,
    1. Comments
      u will also need to give comments/captions
      (on the left of the radio button)
    2. try this (just copy paste)
    REPORT abc.
    selection-screen begin of line.
    selection-screen comment 10(20) text-001 for field b.
    parameters : b  radiobutton group g1.
    selection-screen comment 40(10) text-002 for field d.
    parameters :            d  radiobutton group g1.
    selection-screen end of line.
    regards,
    amit m.

  • Can I add multiple swing elements on a single line.

    Im adding a number of labels to the JPanel -- is there a way to add them all on one line as opposed to:
    c.add(top1);
    c.add(top2); etc. etc.?

    Im adding a number of labels to the JPanel -- is
    there a way to add them all on one line as opposed
    to:
    c.add(top1);
    c.add(top2); etc. etc.?well you can do
    c.add(top1); c.add(top2);
    but basically no, you can't add them all together at the same time

  • Gui_Download....How to Output the each field in different line

    Hi All,
    I need to  create a text  file that will be downloaded into the pc with the format as
    Personnel Number
    Amount
    Bank
    etc...
    i.e each field should be in a new line.
    and i have to add the Constants like :20:, :23B: etc before each field.
    How can i make this possible?
    Please Help its urgent.
    Regards
    Shareef

    Hi,
    Could you please provide a sample code for that.
    i have tried with it but it is coming in one line.
    Thanks in advance
    Regards
    Shareef

  • What changes are to be made to sqlplus to show all the data on a single lin

    Using Oracle 10.2g
    The problem is that whenevr i run queries and collect the data into log and try to take the o/p.
    It comes in multiples lines in sqlplus
    ex
    select* from facts_table;
    UPN                                                       SID       ACYR
    ================================================== ========== ==========
            ID GRADE                                                       
    ========== ==================================================          
    1140                                                      852       1998
             1 E                                                           
    1140                                                      845       1998
             1 D                                                           
    1140                                                      865       1998
             1 D                                                            What settings need to be changed so that i can see all the data as
    Its a trouble again to modify all the data to be shown properly in the logfile.
    UPN   SID   ACYR   ID   GRADE
    === === ==== === =====something like this.
    Thank you.
    Edited by: Trooper on Jan 11, 2009 3:15 AM

    You can use
    SQL> set lines 150
    Anyway You can use column to help if know column length...
    Example:
    SQL> set lines 100
    SQL> column UPN format a15
    SQL> column SID format a10
    SQL> column ACYR format a15
    SQL> column ID format a15
    SQL> column GRADE format a5

  • Getting output in a single line

    hi to alll
    i want to get output of a column in single line seprated by comma
    like in emp table i have ename column . i need out put like
    scott,king,....,..
    thanx in advance

    In 10g you could use the COLLECT aggegrator to get close:
    select deptno
    , cast(collect(ename) as string_table) staff
    from emp
    group
    by deptno
    where string_table has been defined as
    create type string_table as table of varchar2(40)
    Alternative, you can use Data Cartridge to define a new Aggregator that allows queries like:
    select d.dname
    , count(d.dname)
    , Amisvarchar2Sum(e.ename)
    from dept d , emp e
    where e.deptno = d.deptno
    group by d.dname
    where Amisvarchar2Sum is the user defined aggreation operator. The results are like:
    RESEARCH 4 ALLEN,SCOTT,BLAKE
    SALES 3 KING,BRUCE
    etc.
    See here: Oracle Data Cartridge - Extending the Database at http://technology.amis.nl/blog/index.php?p=34 for a description.
    I hope this will help you.
    Lucas

  • Measuring of Text with Multiple Fonts in One Single Line

    I am following a request to write C++ code for a label that contains several text elements in one single line, varying by font, size, color.... Ok, that can be done easily in GDI+ by measuring each element's width and then execute a DrawString
    for each of the text elements starting at its calculated position.
    So far, I failed miserably.
    The horizontal text positions did not appear to be correct. I reverted now to very simple text width measuring tests where the results are still puzzling.
    Test 1 (GDI+): Use of MeasureString
    With the same font, the width of the string "MM" does not match the double with of the string "M". This cannot be explained with eventual rounding problems.
    Test 2 (GDI+): Use of MeasureCharacterRanges
    Used the same font as for the first test. The width of "MM" is now exactly double of the width of "M". But: The width of the "M" ist lightyears away from the measurement result in the first test.
    Test 3 (GDI): Use of GetCharABCWidthsFloat
    Attempted to create a GDI font as close as possible to the GDI+ font in the previous tests. Unfortunately, this third test shows results which do not match the previous results at all.
    I am appending the full example here; the results I found during the debug session have been added as comments:
    void ApplWindow_TextDrawTest(HDC hDC)
    Gdiplus::Graphics *G = new Gdiplus::Graphics(hDC);
    G->SetTextRenderingHint(TextRenderingHint::TextRenderingHintClearTypeGridFit);
    Gdiplus::StringFormat MyFormat;
    MyFormat.SetAlignment(Gdiplus::StringAlignment::StringAlignmentNear);
    MyFormat.SetFormatFlags(Gdiplus::StringFormatFlags::StringFormatFlagsNoWrap);
    Gdiplus::Font TextFont(L"Calibri", 36, Gdiplus::FontStyle::FontStyleBold, Gdiplus::Unit::UnitPixel);
    const wchar_t *Text1M = L"M";
    Gdiplus::PointF TextOrigin1M(0, 0);
    Gdiplus::RectF TextBounds1M;
    const wchar_t *Text2M = L"MM";
    Gdiplus::PointF TextOrigin2M(0, 50);
    Gdiplus::RectF TextBounds2M;
    //--- Test #1: using MeasureString ----------
    G->MeasureString(Text1M, (INT)wcslen(Text1M), &TextFont, TextOrigin1M, &MyFormat, &TextBounds1M);
    G->MeasureString(Text2M, (INT)wcslen(Text2M), &TextFont, TextOrigin2M, &MyFormat, &TextBounds2M);
    //--- Results: Text 1 Width= 44.414 ("M")
    //--- Text 2 Width= 76.828 ("MM")
    //--- Test #2: using MeasureCharacterRanges ----------
    Gdiplus::Status RCode;
    Gdiplus::RectF LayoutRect(0, 0, 1000, 100);
    Gdiplus::Region RegionsList[3];
    Gdiplus::CharacterRange CRanges[3];
    CRanges[0].First = 0; CRanges[0].Length = 1;
    CRanges[1].First = 1; CRanges[1].Length = 1;
    CRanges[2].First = 0; CRanges[2].Length = 2;
    MyFormat.SetMeasurableCharacterRanges(3, CRanges);
    G->MeasureCharacterRanges(Text2M, (INT)wcslen(Text2M), &TextFont, LayoutRect, &MyFormat, 3, RegionsList);
    RCode = RegionsList[0].GetBounds(&TextBounds1M, G); // Result: Text 1 Width = 32.000 ("M")
    RCode = RegionsList[1].GetBounds(&TextBounds1M, G); // Result: Text 1 Width = 32.000 ("M"; the second char)
    RCode = RegionsList[2].GetBounds(&TextBounds2M, G); // Result: Text 2 Width = 64.000 ("MM")
    //--- Test #3: using the good old GDI ----------
    int MapModeResult = SetMapMode(hDC, MM_TEXT); // MM_TEXT is equivalent to Unit::UnitPixel?
    HFONT TextFont3 = CreateFont(36, 0, 0, 0, FW_BOLD, false, false, false, ANSI_CHARSET, OUT_TT_ONLY_PRECIS, CLIP_DEFAULT_PRECIS, CLEARTYPE_QUALITY, VARIABLE_PITCH | FF_DONTCARE, L"Calibri");
    HGDIOBJ PrevFont = SelectObject(hDC, TextFont3);
    ABCFLOAT ABCCharData;
    BOOL RFlg = GetCharABCWidthsFloat(hDC, (UINT)'M', (UINT)'M', &ABCCharData); // Results: abcfA = 2.000; abcfB = 22.000; abcfC = 2.000
    //--- End of Test ---
    delete G;
    Does anybody have an idea why I get so different results?
    Thanks in advance.

    This is a development question and should be directed to a forum that assists in coding. The forum you posted to is for Windows 7 related questions.
    Sorry I cannot help you
    Don't forget to mark the post that solved your issue as &quot;Answered.&quot; By marking the Answer you are enabling users with similar issues to find what helped you. Lewis Renwick - IT Professional

  • Trouble with auto size text in a single line form field

    Hi.  I'm having an issue with filling out a form in Adobe Reader on my iPad.  The text field is single line.  The font is set to "auto" so that the line of text will not exceed a certain width.  When filling out this form on my laptop using Adobe Reader, it works fine.  As I type additional text, once the field is filled, it shrinks the text font size.  On my iPad, however, it won't let me type any more text in the field once I reach the end.  Does Adobe Reader for iPad not support the "auto" font size in form fields?  And I did check that my version of Adobe Reader is up to date on my iPad, so I do have the latest version.
    Thanks in advance for your help,
    Ashley

    Actually, nevermind.  It must be something wrong with the file.  I tried opening another file and auto resize worked perfectly on it.  Weird though that it works on one file and not another.
    Thanks!
    Ashley

  • Single Line Report issues

    Hi, folks.
    I have a table of employees and a table of certifications. An employee may have 0-15 certifications (and dates completed).
    I'm trying to generate a single line report like this:
    NAME - CPR DATE - FIRST AID DATE - Etc
    I've made an evaluation formula:
    If {Cert_Table.Type} = "CPR" then {Cert_Table.Date}
    This works brilliantly...as long as CPR is the first record that matches the employee ID. If it is the second, it leaves the field erroneously blank.
    I know the ideal way to show this would be a list, but the boss wants a single-line representation of the key certification dates.
    How do I get crystal to report back the CPR date regardless of which order it appears?
    Thanks in advance!

    Hi, 
    There are a couple of ways you can do this.  Following your train of thought, you can build the string like: 
    Create a Group on Employee. 
    In the Group Header create a formula like: 
    WhilePrintingRecords;
    StringVar Certifications := "";
    In the Detail section create a formula like: 
    WhilePrintingRecords;
    StringVar Certifications;
    Certifications := Certifications += {Cert_Table.Date} & " - ";
    In this formula, if your Date field is an actual date type then you will need to use the ToString function to convert it to a string or you will get an error. 
    In the Group Footer create a final formula like: 
    WhilePrintingRecords;
    StringVar Certifications;
    The first two formulas you can format to Suppress so you don't see them. 
    Good luck,
    Brian

  • Smartform address in a single line

    I am having a window where I have address as 3 lines..but I want to keep in the footer in a single line with comma.
    I am using the address node's for it.
    do you have any idea how to do it.

    Hi mark,
    Using ADDRESS NODE the text cannot not be displayed as per your requirement.If you want to display the address in a single line with comma then use TEXT NODE.
    Regards,
    Sravanthi

  • I am filling out an online application for school. Is it possible to set Firefox to check spelling when in a single-line text box without having to right click every time?

    I want to be able to set spell check to occur automatically even for single-line text boxes.

    You can set the pref <b>layout.spellcheckDefault</b> to <i>2</i> on the <b>about:config</b> page to perform the spell check on single line and multi line text fields.
    * http://kb.mozillazine.org/layout.spellcheckDefault
    To open the <i>about:config</i> page, type <b>about:config</b> in the location (address) bar and press the "<i>Enter</i>" key, just like you type the url of a website to open a website.<br />
    If you see a warning then you can confirm that you want to access that page.<br />
    *Use the Filter bar at to top of the about:config page to locate a preference more easily.
    *Preferences that have been modified show as bold(user set).
    *Preferences can be reset to the default or changed via the right-click context menu.

Maybe you are looking for

  • Import and export security 7v to 11v

    Hi All, Before we are using the 7 version in solaris boxes, recently we install the 11.1.2.2 version in Aix boxes can you tell me how to export and import  the security in 7 version to 11.1.2.2 version Thanks, Ash.

  • How to use this function call function 'REUSE_ALV_COMMENTARY_WRITE' in alv

    hi all thanks in advance how to use this function in alv programming call function 'REUSE_ALV_COMMENTARY_WRITE' why use and what purpose use this function plz tell me details plz guide me thanks

  • Video to ipod question

    i have some south park episodes on my hd and they dont want to transfer on to my ipod does anyone have any suggestions?

  • HT204406 itunes match playlists from imac not appearing on ios devices

    I've finally gotten my entire iTunes library onto iTunes Match.  (Be patient folks, it only took 4 weeks for my entire library to load!) However, the Playlists that I've created on my iMac are not appearing on any of my IOS devices (iPad, iPhone, etc

  • Dell camera problems

    eveytime i open my camera/video its reboots saying attempted excecute of no memory excecute what do i do i tried using other apps as well with no luck...?