How use locator with sax to get line number of an element?

dear friends,
it's clearly stated in subject. after trying for hours, i still couldn't figure out how to get line numbers. my class extends defaulthandler. please help.
ozgur

hi
i am also struggling with same problem
someone plssssssss help.....
how can i use Locator to get line number of the XML document.
in my extended DefaultHandler class i have just implemented this,
public void setDocumentLocator(Locator location) {
     lineNumber = location.getLineNumber();
but no help...
how to register my parser to the documnet locator events?
plzzzzzzz help...
-Soni

Similar Messages

  • How to get Line Number in Purchase Order

    Hi Experts
    I want to get Line Number of Matrix of Purchase Order. How I get it ?
    I want to compare Matrix Line Number with Line Number of POR1 in DB.
    Please Help me.
    Hepil Doshi

    Hi Hepil,
    Linenum in Matrix "38" is Columns.Item("110").Value
    SBO application doesnot show it, but you can get the linenum from that column.
    You can test by getting the column title. omatrix.columns.item("110").Title
    Hope it helps.
    Regards
    Edy

  • How in ColdFusion with in variables get a Oracle stored procedure to return values?

    How in ColdFusion with in variables get a Oracle stored procedure to return values?
    We have tried several things, we can get  a stored procedure to return a result set if we are not passing in variables but we cannot get them when we are passing in variables.
    We know how to do it calling  MS SQL.
    Thanks for any help,
    Nathan Sr
    P.S. we have heard this may not be possible with the current Oracle Driver is there a different Oracle driver?

    I can only barely understand what you're asking here (not from a technical perspective, but from understanding your written English), but I suspect you're wanting to know how to pass back values other than recordsets from Oracle?
    You should be able to pass them back via a type=out proc param, shouldn't you?
    If you could reword your post so it's a bit more coherent, and possibly post some code, that might help.
    Adam

  • How use multithead with socket

    How use multithead with socket
    I need do a client and server program that accept multitherad issue
    Thanks who can help me

    you'd have to do something like this:
    (this is all assuming you want to read Strings from the socket. setSoTimeout works for any read() call to the InputStream associated with the Socket)
    ServerSocket ss = new ServerSocket(myPort);
    Socket s = ss.accept();
    s.setSoTimeout(5*60*1000); // 5 mins * 60 secs * 1000ms
    BufferedReader in = new BufferedReader(new InputStreamReader(s.getInputStream()));
    boolean running = true;
    while(running)
    try
    String readIn = in.readLine();
    // do whatever you want with the data read
    catch(SocketTimeoutException)
    running = false;
    Now. That's what I think needs to be done. I don't have Java on the machine I'm currently on, so I can't test/verify it, but it goes something like that.
    Good luck,
    Radish21

  • How to use Spry.Utils.extractParamsFromForm to get value of a form element

    Can we use Spry.Utils.extractParamsFromForm to get value of a
    form element ?
    I tried this
    quote:
    var cid =
    Spry.Utils.extractParamsFromForm('adForm','category');
    Here the form name is adForm and category is an select item.
    This gives me error
    quote:
    elements.join is not a function
    Any idea on this guys.

    Can we use Spry.Utils.extractParamsFromForm to get value of a
    form element ?
    I tried this
    quote:
    var cid =
    Spry.Utils.extractParamsFromForm('adForm','category');
    Here the form name is adForm and category is an select item.
    This gives me error
    quote:
    elements.join is not a function
    Any idea on this guys.

  • Get line number error

    Hi
    Is there some way to get line number error when there is some exception ?
    I use oracle 9.2.02
    thank you in advance

    sybrand_b wrote:
    When you trap the exception you need to use dbms_utility.format_error_stack.
    Thid will not provide correct line numbers. This issue has been resolved in 10g or 11g, and 9iR2 is going completely out of support in July.FORMAT_ERROR_STACK will not provide any line numbers:
    SQL> select * from v$version
      2  /
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production
    PL/SQL Release 11.1.0.6.0 - Production
    CORE    11.1.0.6.0      Production
    TNS for 32-bit Windows: Version 11.1.0.6.0 - Production
    NLSRTL Version 11.1.0.6.0 - Production
    SQL> set serveroutput on format word_wrapped
    SQL> begin
      2      raise no_data_found;
      3    exception
      4      when no_data_found
      5        then
      6          dbms_output.put_line('ERROR_STACK: ' || DBMS_UTILITY.FORMAT_ERROR_STACK);
      7          dbms_output.put_line('ERROR_BACKTRACE: ' || DBMS_UTILITY.FORMAT_ERROR_BACKTRACE);
      8  end;
      9  /
    ERROR_STACK: ORA-01403: no data found
    ERROR_BACKTRACE: ORA-06512: at line 2
    PL/SQL procedure successfully completed.
    SQL>  SY.

  • How to get line number in JAVA code?

    Hi,
    What method can I use to return the current line number of my coding?
    Assuming I'm at line 10 and I want to do something like System.out.println("I am at line number " + ????);What method should I use to get "10"?
    Please advise.
    Thank you.

    If you run Java in Dos prompt, a new line of result is displayed at bottom and the screen scroll. There is no line number in that way. Other language like C have something like that.
    If you use Java Swing, you can display with x, y coordinate option but it is graphic mode.

  • How to play with javascripts from command line?

    This is a problem that I always have no clue how to deal with.
    To begin with, take a look at this page: http://jsharer.com/file/1345737.htm
    If you click on "[TUTHE@ManYv][D`z][FLCL][05][H264_Vorbis][E4273181].mkv", after a little while a little window pops up and if you right click on the "点击此处开始下载", you can copy the direct download link.
    I previously used a simple bash script using curl to parse direct download links from this site. I like to do it at command line. It was easy because the link used to be directly shown in the page source code (though I had to call curl twice for it, it was fine.)
    But now I can't. It's all javascript. I ain't got no idea how to deal with this kind of stuff. I made my attempt to look at the page source, all I can tell is that the <div id="download_block"> part and the <div id="lord_content"> line seems to be important.
    I want to use my old good command line instead of click click click!
    Can somebody help me with this? Or please just give me some hints. It'd be fully appreciated. Thanks!

    If you know python, the package community/python-mechanize lets you automate a lot of this kind of thing. You can tell it to go to url so-and-so, simulate a click on the third link matching regexp such-and-such, preserving cookies the original page gave you, and so on.
    Has made most of my webpage scraping a hell of lot easier.
    EDIT: but I don't know whether it processes embedded Javascript, perhaps not.
    Last edited by Profjim (2009-09-03 11:22:37)

  • How use jdbc with swing ? i am new in this concept.

    hi
    freinds,
    i am new in java can any one give the example which explain the how to use jdbc with swing.
    thanks in advace.
    satish
    thanks.

    See here  >  http://support.apple.com/kb/HT4236
    More info in the User Guides for your Devices...

  • How use Tomcat with MySQL

    Can anybody suggest me as how to use Tomcat with MySQL server.
    Thanks in advance.
    Khiz_eng

    add the classpath to the JDBC-driver to the tomcat-
    environment (I did it in tomcat.sh)
    Then put your code accessing MySQL into a servlet....
    You can put the user-ID and the password into a session-
    object or read them in as parameters.
    The book 'core Servlets and Java Server Pages' from
    Marty Hall gave me a lot information.
    Regards
    Fredy

  • How to get Line number from a DOM Element

    Hi
    I am using dom xerces parser. Is there anyway to work out which line number a element will be when it is outputted into a file ??

    org.w3c.dom.DOMLocator method getLineNumber() returns the line number at which an error occurs.
    A corrresponding method for file output is not defined.

  • Getting line number of  XML document

    Hi all,
    Can someone please help me in 'how to get the line number of XML document'. I know when it throws SAXParseException it give the line number. I want to get the line number when it parses the document successfully. I know i need to use setDocumentLocator and then implement the Locator.
    can someone give me a chunk of code for it.
    thx in advance,
    -Soni

    Hi,
    Atlast i got the solution. It goes like this..
    class A {
    Location loc;
    public void setDocumentLocator(Locator l) {
    loc = l;
    //Here goes other methods like startElement, endElement etc.
    public void someMethod() {
    loc.getLineNumber(); //u can do this anywhere inside the class
    -Soni

  • To get line number for xml file.

    how do u get th line number of a particular node i parse.
    is it possible only when error comes the line number and mesage can be displayed.
    is it possible when i use xpath expression for a particular node and if that xpath returns boolean false then can i get the line number where the node present..??
    plz reply..

    There are java classes that will give you the line number of records from files you are reading. Names begin with Line...

  • Oracle EBS - Get Line number.

    Hi Friends,
    I got a tricky requirement.
    Get the line number which is in the Sales order form ie (1.1,2.1,3.1) , using the line_id.
    Is there any way to get the line numbers.
    Please help me.
    We can get the line_number using the query
    select line_number from oe_order_lines_all where header_id =12345
    but the requirement is get the line numbers which are displayed in Sales order form.
    it has some version numbers
    like
    1.1
    2.1
    1.1.1
    like this .. i need this line numbers.
    Any way to get this.
    Please help.

    Pl.try.
    select line_number, shipment_number, line_number||'.'||shipment_number from oe_order_lines_all where header_id = <i/p header_id>

  • Trying to get serial number to install elements 12.

    I am trying to get the serial number to install elements 12.  Have entered the redemption code but the redeem button does not activate.

    You should try using a different browser if the one you are using is not working with the interface properly.  Below is a link to a help document that might provide some helpful tips if you continue to have a problem.
    Redemption Code Help
    http://helpx.adobe.com/x-productkb/global/redemption-code-help.html

Maybe you are looking for

  • Issue with ADF table range paging and sorting

    Hello, We have a requirement to support pagination in ADF tables. For this, we have made use of Range paging access mode in the view object level. The paging works perfectly fine with this. But we have another requirement of letting the user do a sor

  • Storing internal table from XML File into DDIC

    Hi everybody, im trying to store an internal table <b>without</b> knowing the content - means the structure (fields)- into th DDIC, but i failed. The code is: DATA xslt_error TYPE REF TO cx_xslt_exception. TRY . perform load_file  using 'D:/usr/YTGVF

  • Dynamic Filename Error

    Hi all, I have the requirement of getting same file name with timestamp on the receiver side (EX.Filename_timestamp) by modifying the Adapterspecific messageattributes refering the following blog Re: Regarding Target File name and wrote the code as s

  • What resolution are photos optimized for ipod display? (post computer sync)

    From what I've read here, iPod touch forces photos sync'ed from a computer through a optimization step for display on the iPod (and TV). Full-resolution images can only be stored on iPods that have "enable disc use" mode (which iPod touch does not ha

  • Jdev debug stop at breakpoint at ClassLoader.java or BootStrap notfound

    Dear All Anyone kindly guide me why when I start debug jdev toolbox tutorial file, jdev always stop at Exception of ClassLoader.java. and never reach my working files. . Debugger connected to local process. Exception breakpoint occurred at line 891 o