SAX parsing problem

Discussion in 'XML' started by silviu, Sep 19, 2003.

  1. silviu

    silviu Guest

    I have the following XML string that I want to parse using the SAX
    parser. If I remove the portion of the XML string between the <audit>
    and </audit> tags the SAX is parsing correctly. Otherwise SAX wouldn't
    do the parsing. What's wrong with this string (between <audit> and
    </audit> tags)?
    I am using SAX/Xerces 2.3.0 on Sun 8.
    Thanks in advance of any help. Nick Roman

    <?xml version="1.0" encoding="UTF-8"?> <lyr3:L3Transaction
    xmlns:lyr3="urn:layer.three.activation"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <audit>15:35:05 emsTransaction::setState TRANS_PENDING 15:35:06
    emsRequest::setUndoable id(1502d70) request is undoable 15:35:06
    emsRequest::setState id(1502d70) pending (waiting for response from
    '') 15:35:06 emsRequest::setState id(1502d70) pending (response
    'Enter password: a') 15:35:06 emsRequest::setState id(1502d70) pending
    (waiting for response from 'cisco') 15:35:06 emsRequest::setState
    id(1502d70) pending (response 'sangria2') 15:35:06
    emsRequest::setState id(1502d70) pending (waiting for response from
    'enable') 15:35:06 emsRequest::setState id(1502d70) pending (response
    'Enter password:') 15:35:06 emsRequest::setState id(1502d70) pending
    (waiting for response from 'cisco') 15:35:06 emsRequest::setState
    id(1502d70) pending (response 'sangria2 (enable)') 15:35:06
    emsRequest::setState id(1502d70) pending (waiting for response from
    'set length 0') 15:35:06 emsRequest::setState id(1502d70) pending
    (response 'sangria2 (enable)') 15:35:06 emsRequest::setState
    id(1502d70) pending (waiting for response from 'show version')
    15:35:07 emsRequest::setState id(1502d70) pending (response 'sangria2
    (enable)') 15:35:07 emsRequest::setState id(1502d70) pending (waiting
    for response from 'show running-config') 15:35:10 emsRequest::setState
    id(1502d70) pending (response 'sangria2 (enable)') 15:35:10
    emsRequest::setState id(1502d70) pending (waiting for response from
    'show vlan') 15:35:10 emsRequest::setState id(1502d70) pending
    (response 'sangria2 (enable)') 15:35:10 emsRequest::setState
    id(1502d70) complete ((cli6509v1Anchor) complete) 15:35:10
    emsRequest::setUndoable id(159b780) request is undoable 15:35:10
    emsRequest::setState id(159b780) pending (waiting for response from
    'set vlan 667 name test-vlan type ethernet mtu 1500 said 100667
    state active') 15:35:10 emsRequest::setObjectAltered request will
    require undo during rollback 15:35:10 emsRequest::setState
    id(159b780) pending (response 'Vlan 667 configuration successful')
    15:35:10 emsRequest::setState id(159b780) ((cli6509v1AddVlan)
    complete) 15:35:10 emsTransaction::setState TRANS_COMPLETE</audit>
    <statuscode>4</statuscode>
    <request>
    <requestType action="add" type="vlan"/>
    </request>
    </lyr3:L3Transaction>
     
    silviu, Sep 19, 2003
    #1
    1. Advertising

  2. (silviu) writes:

    > I have the following XML string that I want to parse using the SAX
    > parser. If I remove the portion of the XML string between the <audit>
    > and </audit> tags the SAX is parsing correctly. Otherwise SAX wouldn't
    > do the parsing. What's wrong with this string (between <audit> and
    > </audit> tags)?


    I can see nothing wrong with what you posted. Can you let us know
    what error message you got?


    All the best,


    David
     
    David Megginson, Sep 19, 2003
    #2
    1. Advertising

  3. silviu

    silviu Guest

    Hi David,

    Thanks a lot for you answering my question.
    Following the required info:
    1. If <audit>...</audit> tags are NOT present in the string
    then SAX parses correctly the XML string.
    2. If <audit>...</audit> info ARE present in the string
    then SAX parser will not do nothing; i.e. nothing will happen and
    no error messages will be issued.

    So, I my opinion, <audit>...</audit> info causes SAX parser to
    misbehave. The question I have is: what is wrong with
    <audit>...</audit> info?


    Thanks,
    Silviu

    David Megginson <> wrote in message news:<>...
    > (silviu) writes:
    >
    > > I have the following XML string that I want to parse using the SAX
    > > parser. If I remove the portion of the XML string between the <audit>
    > > and </audit> tags the SAX is parsing correctly. Otherwise SAX wouldn't
    > > do the parsing. What's wrong with this string (between <audit> and
    > > </audit> tags)?

    >
    > I can see nothing wrong with what you posted. Can you let us know
    > what error message you got?
    >
    >
    > All the best,
    >
    >
    > David
     
    silviu, Sep 19, 2003
    #3
  4. (silviu) writes:

    > Thanks a lot for you answering my question.
    > Following the required info:
    > 1. If <audit>...</audit> tags are NOT present in the string
    > then SAX parses correctly the XML string.
    > 2. If <audit>...</audit> info ARE present in the string
    > then SAX parser will not do nothing; i.e. nothing will happen and
    > no error messages will be issued.


    That sounds like a software bug. Try a different SAX parser and see
    what happens.


    All the best,


    David
     
    David Megginson, Sep 19, 2003
    #4
  5. silviu

    Bob Foster Guest

    "silviu" <> wrote in message
    news:...
    > Hi David,
    >
    > Thanks a lot for you answering my question.


    Hi Silviu,

    But you didn't answer David's question. What error message are you getting?
    I can tell you for a fact that the latest version of Xerces has no problem
    with your document. AFAIK, there isn't any problem.

    Bob Foster

    > Following the required info:
    > 1. If <audit>...</audit> tags are NOT present in the string
    > then SAX parses correctly the XML string.
    > 2. If <audit>...</audit> info ARE present in the string
    > then SAX parser will not do nothing; i.e. nothing will happen and
    > no error messages will be issued.
    >
    > So, I my opinion, <audit>...</audit> info causes SAX parser to
    > misbehave. The question I have is: what is wrong with
    > <audit>...</audit> info?
    >
    >
    > Thanks,
    > Silviu
    >
    > David Megginson <> wrote in message

    news:<>...
    > > (silviu) writes:
    > >
    > > > I have the following XML string that I want to parse using the SAX
    > > > parser. If I remove the portion of the XML string between the <audit>
    > > > and </audit> tags the SAX is parsing correctly. Otherwise SAX wouldn't
    > > > do the parsing. What's wrong with this string (between <audit> and
    > > > </audit> tags)?

    > >
    > > I can see nothing wrong with what you posted. Can you let us know
    > > what error message you got?
    > >
    > >
    > > All the best,
    > >
    > >
    > > David
     
    Bob Foster, Sep 20, 2003
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jonathan
    Replies:
    0
    Views:
    409
    Jonathan
    Oct 28, 2003
  2. Naren
    Replies:
    0
    Views:
    585
    Naren
    May 11, 2004
  3. anon

    SAX parsing problem

    anon, Mar 16, 2005, in forum: Python
    Replies:
    3
    Views:
    322
    Uche Ogbuji
    Mar 23, 2005
  4. Kai Schlamp
    Replies:
    1
    Views:
    419
    Arne Vajhøj
    Mar 27, 2008
  5. Stefan Behnel
    Replies:
    5
    Views:
    439
Loading...

Share This Page