473,396 Members | 1,866 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

SAX parsing problem

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>
Jul 20 '05 #1
4 2280
th*************@yahoo.com (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
Jul 20 '05 #2
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 <no****@attglobal.net> wrote in message news:<87************@megginson.com>...
th*************@yahoo.com (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

Jul 20 '05 #3
th*************@yahoo.com (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
Jul 20 '05 #4
"silviu" <th*************@yahoo.com> wrote in message
news:f5**************************@posting.google.c om...
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 <no****@attglobal.net> wrote in message

news:<87************@megginson.com>...
th*************@yahoo.com (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

Jul 20 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

303
by: mike420 | last post by:
In the context of LATEX, some Pythonista asked what the big successes of Lisp were. I think there were at least three *big* successes. a. orbitz.com web site uses Lisp for algorithms, etc. b....
16
by: Terry | last post by:
Hi, This is a newbie's question. I want to preload 4 images and only when all 4 images has been loaded into browser's cache, I want to start a slideshow() function. If images are not completed...
3
by: uestebanez | last post by:
Hi everybody! I have a little problem working with libxml SAX API. The problem is that I don't know how to stop parsing when I have processed the data I need. I don't want to parse all file, I...
5
by: gamehack | last post by:
Hi all, I was thinking about parsing equations but I can't think of any generic approach. Basically I have a struct called math_term which is something like: struct math_term { char sign; int...
9
by: ankitdesai | last post by:
I would like to parse a couple of tables within an individual player's SHTML page. For example, I would like to get the "Actual Pitching Statistics" and the "Translated Pitching Statistics"...
3
by: toton | last post by:
Hi, I have some ascii files, which are having some formatted text. I want to read some section only from the total file. For that what I am doing is indexing the sections (denoted by .START in...
3
by: Anup Daware | last post by:
Hi Group, I am facing a strange problem here: I am trying to read xml response from a servlet using XmlTextWriter. I am able to read the read half of the xml and suddenly an exception:...
13
by: Chris Carlen | last post by:
Hi: Having completed enough serial driver code for a TMS320F2812 microcontroller to talk to a terminal, I am now trying different approaches to command interpretation. I have a very simple...
1
by: Philip Semanchuk | last post by:
On Oct 12, 2008, at 5:25 AM, S.Selvam Siva wrote: Selvam, You can try to find them yourself using string parsing, but that's difficult. The closer you want to get to "perfect" at finding URLs...
2
by: Felipe De Bene | last post by:
I'm having problems parsing an HTML file with the following syntax : <TABLE cellspacing=0 cellpadding=0 ALIGN=CENTER BORDER=1 width='100%'> <TH BGCOLOR='#c0c0c0' Width='3%'>User ID</TH> <TH...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.