How to echo the first line???

Hi everybody,
I need to know how to echo the first line of an XML document with a SAX parser, for example :
<?xml version="1.0"?>I've already tried :
public void processingInstruction(String target, String data) throws SAXException {
        System.out.println("Target = (" + target + ")");
        System.out.println("Data = (" + data + ")");
    }but it doesn't work.
Please, help me...
Thanks.
Maxime.

http://java.sun.com/webservices/docs/1.0/tutorial/doc/JAXPSAX4.html

Similar Messages

  • How to set the First Line of Table UI in Web Dynpro ABAP

    Hi Team,
    I have a scenario where I'm displaying two Table controls one below the other. When a line is selected in the first(Top) table, I have a supply function(Event) and I fill the second(bottom) table. Everything works fine till here.
    The problem starts when I scroll the bottom table. Lets assume that I'm at line 20 of the second table and I press the lead selection to select another line on the first table. Here the second table is filled with new data but it is automatically scrolled to line 20. My questions:
    1) Do I have to set some specific property of the second table? If yes, which one and where should I set it (In the supply function? I already have the "visibleRowCount" set to "10")
    2) How do I dynamically get access to the Table Control properties?
    Thanks for your time

    Thank you Maksim,
    I did set the "selectionMode" to "Auto". I don't understand where In supply function I have to set lead selection of nested node to first element. Please elaborate on this. Are you talking about the context attribute bound to the second table? OR do I have to change the Importing parameters "Node" and "Parent_Element" of my supply function?
    Thanks for your time.

  • Read the first line of the table.

    Hi,
    Can you pls let me know as to how I read the first line of the table.
    Thx.

    hi check this.
    data: begin of itab occurs 0,
            matnr like mara-matnr ,
            meins like mara-meins,
            end of itab.
    select-options: s_matnr for mara-matnr .
    select matnr
             meins
             from mara
             into table itab
             where matnr in s_matnr .
    read table itab index 1 .
    loop at itab .
    write:/ itab-matnr .
    endloop .
    regards,
    venkat.

  • How to view the first and the last frame of a clip or a selected range in the time line?

    How to view the first and the last frame of a clip directly or in a selected range in the time line ? Up arrow and down arrow keys changes only between the first frame of the consecutive clips. Even ; and ' does the same. I mean what is the shortcut keys for first to last and last to first frame of a clip? Help please.

    SELECT PurOrderNum,
    OrderDate
    FROM
    SELECT PurOrderNum,
    OrderDate,
    MAX(OrderDate) OVER (PARTITION BY DATEDIFF(mm,0,OrderDate)) AS MaxDate,
    MIN(OrderDate) OVER (PARTITION BY DATEDIFF(mm,0,OrderDate)) AS MinDate
    FROM Purchasing.PurOrder
    WHERE OrderDate >= '2013-02-28'
    AND OrderDate <= '2014-12-29'
    )t
    WHERE OrderDate = MaxDate
    OR OrderDate = MinDate
    Please Mark This As Answer if it solved your issue
    Please Vote This As Helpful if it helps to solve your issue
    Visakh
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • I need to change the "from" address (the "add to addressbook" address) in the first line of emails that I send. How do I do this?

    I need to change the "from" address (the "add to addressbook" address) in the first line of emails that I send so that people reply to my email alias not the address where my emails originate. How do I do this?

    So you have added a new 'Identity' to your existing email address.
    If someone sends an email using that 'other identity'
    you have a choice of where those received emails can go. they can be received into the original mail account, like a collect all in the one Inbox or perhaps sent to Local Folders, so you can see them as separate. Or you can filter on that identity to put those emails in a specific folder.
    When you REply to any incoming mail that has used that new identity email address, it will use the new identity in the Email address in FROM assuming the received email in the main mail account of which the new identity email is applied.
    This should also now offer the added identity email address as an option in the FROM drop down list. So you can easily swap when sending an email if required.
    If you want to send using your default email address to people, but want their reply to use the identity email address:
    Tools > Account Settings
    select the original email address mail account name
    Where it says: 'Reply to addresses: enter the reply to identity email address.
    click on OK
    This means when they click on 'Reply' it will auto insert the Reply-to option.
    This will work providing it is a 'Reply' to an email you sent which contains the Reply-to email address.
    If someone is not actually replying by using the Reply-to new identity email address:
    In other words they are sending you a new email using the original email address because perhaps that is the one in their address book or the one they located on a webpage etc.
    Then, when you select to Reply to that email, it will use the email address to which it was sent to in the FROM field - the original email address. Hence why you would need to select the new identity FROM in the drop down list.
    One way to get around this is set out below.
    If you do not use an identity - instead you create another existing mail account for the 'identity' email address, so you have two mail accounts for the two email addresses.
    You can move selected emails manually or perhaps using a filter to screen them from the original mail account into the newly created mail account.
    Then when you click on Reply, it will use the new mail account email address instead of the original email address.

  • How to set cursor at the first line in a table control?

    Hi,
           I have a customized infotype screen where a table control is being used to input new values.The tab control has 30 lines.Now, the problem is that when the screen is displayed, the cursor always starts at 8th or 4th line.The behaviour is not very consistent.I tried the following statement in the PBO, but no effect.
    SET CURSOR FIELD P9417-ZCOUNTRY LINE 1.  ( P9417-ZCOUNTRY is the name of the tab control field where i want to set the cursor ).This is the last statement in the PBO.
    Can someone please tell me why still I am not able to set the cursor at the first line? I have infact noticed that , in the debugging mode , sometimes the cursor starts at the first line.Please help. Thanks

    I have got a new requirement on this now. If the table control does not have any records , then the cursor position should be on the first row.Otherwise, if it already has some records, then the cursor should be at the first empty row.I wrote the code like below.
    if sy-ucomm = 'INSERT'.
    set cursor 'P9714-ZCOUNTRY'  line 1.
    else if sy-ucomm eq 'CHANGE'.
    describe table itab lines fill.
    fill = fill + 1.
    set cursor 'P9714-ZCOUNTRY'  line fill.
    endif.
    I am facing a strange problem now.The table control has some 10 rows when you see the screen for the first time.If the number of records already present is less than 10, I am able to position the cursor on the first empty row.But if the number is say 15, then the cursor position goes to eighth or fourth line or sometimes the first line.
    Is there any way to display the last few records , ie, if there are 15 records , is there any way to display the last five rows when I see the screen for the first time, rather than showing the first 10 records?How can I position the cursor at the first empty row, when there are more records?
    Thanks in advance..good answers will be rewarded.
    Mahesh

  • Help with how to count the number of tokens from the first line

    Hi
    I want to count the number of tokens from the first line of text, from my incoming file and print it out.
    For example i have 12 tokens in the first line, so i want it to print out the number 12
    my code is below
    thanks
    import java.io.*;
    import java.util.*;
    import java.lang.*;
    import java.util.StringTokenizer.*;
    import java.sql.*;
    public class Data {
         public static void main(String[] args) {
                        String token = null;          
                        String currentToken = "";
                        Hashtable hh = new Hashtable();     
              try {
                   Vector v2 = new Vector(100);
                   Vector v = new Vector(100);
                   FileReader file = new FileReader("words.txt");
                   BufferedReader buff = new BufferedReader(file);
                   String line = buff.readLine();
                   StringTokenizer s = null;
                   boolean eof = false;
                   while  (!eof){
                        s = new StringTokenizer(line.trim(),",",true);
                        boolean lastToken = true;
                   while (s.hasMoreTokens()) {
                              token = s.nextToken();
                                  if (lastToken){
                                   if (token.equals(",")) {
                                        v.add("");
                                               lastToken = false;
                                      if (! token.equals(",")) {
                                   v.add(token);
                                  else { if (currentToken.equals(",")) {
                                        v.add("");
                                  currentToken = token;
                        if (token.equals(",")) {
                               v.add("");
                   line = buff.readLine();
                        if (line == null){     
                             eof = true;}
                   buff.close();
              }catch (FileNotFoundException fe) {     
                        System.out.println("Error - - " + fe.toString());
              }catch (NumberFormatException ne) {
                        System.out.println("Error - - " + ne.toString());
              } catch (IOException e) {
                   System.out.println("Error - - " + e.toString());
    }     2.

    I can print out the amount of tokens from each line,
    But i only want the first line to be counted, And i
    also do not want the delimeters to be counted.
    could you please give me some ideas?
    Thanks
    try
       BufferedReader br = new BufferedReader(new FileReader("item.kr"));
       while((str=br.readLine())!= null)
          itemslist.add(str);
    catch(IOException ioe)
       System.out.println("Exception Occurred!!!");
    }This snippet gets one Line from the item.kr file.
    Then i would count (By useing a diffrent String Tokenizer) to count only this line!!!

  • How to delete the logical lines in JTextArea

    Hi all,
    Now that I know how to find the logical line count in JTextArea as
    I found the following in the forum.
    public static int getLineCount (JTextArea _textArea)
    boolean lineWrapHolder = _textArea.getLineWrap();
    _textArea.setLineWrap(false);
    double height = _textArea.getPreferredSize().getHeight();
    _textArea.setLineWrap(lineWrapHolder);
    double rowSize = height/_textArea.getLineCount();
    return (int) (_textArea.getPreferredSize().getHeight() / rowSize);
    I want to delete the 4th line to the last line and append ... at the 4th, if the getLineCount exceeds 3. Does any body know how to do so?
    The intention is for the multiline tooltip as I just want to show
    the first three logical line and ... if the string is too long.
    Thanks
    Pin

    The code looks good to me. The only thought I have is that the y coordinate for the rowThree point is wrong and is referencing row four.
    I've been playing around with using a JTextArea as a renderer for a JTable. I have it working so that "..." appear when the text exceeds 2 rows. Try clicking on "B" in the letter column and then the update cell button a few times to add text. My code is slightly different than yours.
    import java.awt.*;
    import java.awt.event.*;
    import java.util.*;
    import javax.swing.*;
    import javax.swing.table.*;
    public class TestTable extends JFrame
         private final static String LETTERS = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
         JTable table;
         Vector row;
         public TestTable()
              Object[][] data = { {"1", "A"}, {"2", "B"}, {"3", "C"} };
              String[] columnNames = {"Number","Letter"};
              DefaultTableModel model = new DefaultTableModel(data, columnNames);
              table = new JTable(model)
                   public String getToolTipText( MouseEvent e )
                        int row = rowAtPoint( e.getPoint() );
                        int column = columnAtPoint( e.getPoint() );
                        if (row == 0)
                             return null;
                        else
                             return row + " : " + column;
              table.setRowSelectionInterval(0, 0);
              table.setColumnSelectionInterval(0, 0);
              table.setRowHeight(0,34);
              table.setRowHeight(1,34);
              table.setRowHeight(2,34);
              table.setDefaultRenderer(Object.class, new TextAreaRenderer(2));
              JScrollPane scrollPane = new JScrollPane( table );
              getContentPane().add( scrollPane );
              JPanel buttonPanel = new JPanel();
              getContentPane().add( buttonPanel, BorderLayout.SOUTH );
              JButton button2 = new JButton( "Update Cell" );
              buttonPanel.add( button2 );
              button2.addActionListener( new ActionListener()
                   public void actionPerformed(ActionEvent e)
                        int row = table.getSelectedRow();
                        int column = table.getSelectedColumn();
                        String value = (String)table.getValueAt(row, column);
                        value += value;
                        table.setValueAt( value, row, column );
                        DefaultTableModel model = (DefaultTableModel)table.getModel();
                        model.fireTableCellUpdated(row, column);
                        table.requestFocus();
         public static void main(String[] args)
              TestTable frame = new TestTable();
              frame.setDefaultCloseOperation( EXIT_ON_CLOSE );
              frame.pack();
              frame.setVisible(true);
         private class TextAreaRenderer extends JTextArea implements TableCellRenderer
              public TextAreaRenderer(int displayRows)
                   setRows(displayRows);
                   setLineWrap( true );
              public Component getTableCellRendererComponent(JTable table,
                                             Object value,
                                             boolean isSelected,
                                             boolean hasFocus,
                                             int row,
                                             int column)
                   setText( value.toString() );
                   Dimension d = getPreferredSize();
                   int maximumHeight = getRows() * getRowHeight();
                   if (d.height > maximumHeight)
                        setSize(d);
                        int offset = viewToModel( new Point(d.width, maximumHeight - 1) );
                        replaceRange( "...", offset-3, getDocument().getLength() );
                   return this;
    }

  • How to add the new line in reciever FCC

    Hi All,
    I have my reciever FCC with me, but I just need to add one more additional line or you can say seprate the first line.
    So how to add extra or new line in the current structure?
    Please let me know if there is any parameter for this.
    Thanks in advance.
    Regards,
    Rahul Kulkarni

    Hi Rahul,
    You can achieve this by endseperatot "nl"
    If record set structure is * means fine, you just add second line field names by using end separator "nl".
    If you added first line names in recordsetstructure add second line names as well and remaining same use end separator.
    Example (below file is having two lines):
    <NameA>
    name,address,id
    empid,sal,region
    <NameA/>
    your FCC will be (according to your requirement the below 3 fileds will be use full).
    Recordsetstructure  - *
    NameA.fieldvalues - name,address,id
    NameA.endseperator - nl
    NameA.fieldvalues - empid,sal,region
    Thanks & Regards,
    A.Neelima.

  • D110 only prints the first line.

    If I send an item to the printer, it only prints the title. I have tried to copy to notepad and pasted to an email. Then sent it to the printer thru an email. It only prints the first line. How do I get it to print the whole item?

    You can use one of our diagnostic tool and can this can help you resolve the issue automatically and you can use it in future as well.
    http://h10025.www1.hp.com/ewfrf/wc/softwareCategory?os=4132&lc=en&cc=sg&dlc=en&sw_lang=&product=5169...
    Check if the issue gets resolved.
    Say "Thanks" by clicking the Kudos Star in the post that helped you.
    Please mark the post that solves your problem as "Accepted Solution"
    (Although I am employed by HP, I am speaking for myself and not for HP)

  • How to remove the blank lines at the end of the JTextArea .

    Hi,
    I need to remove the blank lines in the JTextArea at the end. Suppose i am giving 'A' in the first line and press the enter key two times, after i am giving the 'B' in the third line and press enter key for two times. I need to remove, the last two lines of JTextAreae, . How i can remove these lines?

    String#trim() removes all whitespace from both ends of the String.
    The requirement was to remove line breaks from the end of the String only.
    String#replaceAll with a suitable regex would do the trick. Untested regex for this:text.replaceAll("[\\n\\r]+$", "")db

  • Hyperlink cut after the first line

    Hello,
    we use adobe acrobat pro with adobe pdf printer. when we print a word document with hyperlinks over several lines with the pdf printer and open it after printing then the hyperlink will show's in the pdf document but the hyperlink will cut after the first line...
    can anybody tell my how i can fix this problem?
    thank you
    regards
    christopher

    The links you see in Acrobat or Reader after you print to the Adobe PDF printer are just the best guesses of these packages when it sees something like a link. To get the links embedded you either have to do it in Acrobat directly or use the Convert button as Bernd mentioned.

  • When printing a highlighted (selected) print range from an internet item pulled up through Firefox, the first line of the selected range is not printing or is partially cut off.

    When printing a highlighted (selected) print range from an internet item pulled up through Firefox, the first line of the selected range is not printing or is partially cut off. This is not an issue with my printer, as printer prints the whole selected print range when using Internet Explorer or Word Doc applications. The problem only happens when using Firefox. Please advise on how to fix this. Is this a settings issue or do I need to download and update? Thx

    * [[Printing a web page]]
    * [[Firefox prints incorrectly]]
    Check and tell if its working.

  • Always the first line

    i have table with a lot or rows
    i want always the first line
    how?select single?

    HI,
    U can store the field in desired variable also...
    Ex:
    data : v_ebeln like ekko-ebeln.
    select ebeln into v_ebeln from ekko up to 1 rows <Where condition also can be specified if required>.
    endselect.
    Sreedhar

  • Display totals on the first line in ALV grid and ALV LIST

    Generally we wll display totals at the end..
    bu the requirement is to display it in the first line of the column.
    how to display the totals in the first line?
    I have used ALV GRID and ALV LIST (choice) using function modules.
    Plz help me
    .for example : Po qty : Should display total po qty on the first line of the Po line item.

    IN LAYOUT
    ILAYOUT-totals_before_items = 'X'.
    REGARDS
    SHIBA DUTTA

Maybe you are looking for

  • SD tax G/L account determination

    First, I am not a Finance person nor do I know a lot about tax configuration.  My background (relevant for this issue) is in S/D pricing and associated account determination.  This is an S/D tax calculation and account determination issue for the Uni

  • How to send different message types to different partners in purchase orde?

    Hi Folks, I have been searching the forum for my question and have not found a solution yet. Maybe there is one out there that can give the solution. The situation is as follows. PO is created and output is determined for the Vendor and medium is cor

  • Changing position of figure captions (legends)

    Hi, I'm using FrameMaker 9, and I have a question about changing the position of figure captions. Currently in all our docs, figure captions are placed above the figure (above the anchored frame) to which they apply, but the powers that be (much to m

  • Consolidate billing into one invoice?

    We got a project in PS with two billing WBS-elements, let us say Phase 1 and Phase 2. Phase 1 is billed monthly as a fixed price. Phase 2 is billed monthly as Time and Material. Is there any way to produce a single invoice that combines fixed fee wit

  • HT1491 how to sync music from itunes to iphone?

    how do I sync music from that I have downloaded onto itunes on to iphone 4 ?