sjsxp
  1. sjsxp
  2. SJSXP-36

peak() and linenumber() methods are not working.

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Incomplete
    • Affects Version/s: current
    • Fix Version/s: milestone 1
    • Component/s: www
    • Labels:
      None
    • Environment:

      Operating System: Windows 2000
      Platform: All

    • Issuezilla Id:
      36

      Description

      1.currentLineNumber = aXMLevent.getLocation().getLineNumber(); is not returning
      any line number.

      2.peak() method in EventReader() is giving null when the XML is in stepbystep
      form like

      <xml>
      <element>
      </element>
      </xml>

        Activity

        Hide
        gangadharonweb added a comment -

        Created an attachment (id=8)
        stax

        Show
        gangadharonweb added a comment - Created an attachment (id=8) stax
        Hide
        Santiago Pericas-Geertsen added a comment -

        Hi, let me address each of your items in your description independently:

        (1) If you look a the documentation of Location, it clearly states that "-1" is returned if this information
        isn't available. So, technically, this isn't a bug. Whether the information is available or not depends on how
        your XMLEventReader is constructed, so please include the code that shows that.

        (2) Please include a complete test showing the problem that your facing. A couple of us have looked at
        your test fragment but haven't been able to understand the problem.

        Show
        Santiago Pericas-Geertsen added a comment - Hi, let me address each of your items in your description independently: (1) If you look a the documentation of Location, it clearly states that "-1" is returned if this information isn't available. So, technically, this isn't a bug. Whether the information is available or not depends on how your XMLEventReader is constructed, so please include the code that shows that. (2) Please include a complete test showing the problem that your facing. A couple of us have looked at your test fragment but haven't been able to understand the problem.
        Hide
        Joe Wang added a comment -

        reassign to Joe.

        Show
        Joe Wang added a comment - reassign to Joe.
        Hide
        Joe Wang added a comment -

        Thanks Gangadhar for the additional information.

        As you commented, you've solved the first problem and was able to get the line
        numbers.

        For the 2nd problem, it appeared that the eventreader's peek() method was
        returning a whitespace, which was what you thought a null. A characters event
        would be returned by checking the event type of the event returned by the peek
        () method.

        I'm closing this issue as not a bug. You may re-open it if you still think
        there's an issue.

        Thanks.

        Show
        Joe Wang added a comment - Thanks Gangadhar for the additional information. As you commented, you've solved the first problem and was able to get the line numbers. For the 2nd problem, it appeared that the eventreader's peek() method was returning a whitespace, which was what you thought a null. A characters event would be returned by checking the event type of the event returned by the peek () method. I'm closing this issue as not a bug. You may re-open it if you still think there's an issue. Thanks.

          People

          • Assignee:
            Joe Wang
            Reporter:
            gangadharonweb
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: