For those of you that replied with suggestions as to what I could do with my 
</> issue, I can report that the following snippet fixed the problem:

cat bad.xml | perl -p -e 's/\<(.*?)\>(.*)\<\/\>/<$1>$2<\/$1>/' > good.xml

I can place this as a filter in my input stream, and we will be well away ( as 
long as we can guarantee that elements are only on one line )

Anyway, now a little question on SAX.

Why are strings containing [\n\t ]* reported as character, rather than 
ignorable whitespace?

For the text:

<FinHdr>
    <Instrument Act="Subscribe" Dest=":Instrument:">
        <Exchange>Test</Exchange>
    </Instrument>
</FinHdr>


31 May 2001 11:38:51,105 [           main] DEBUG b.ged.ovgw.main.OVStreamReader 
 - Start Document
31 May 2001 11:38:51,295 [           main] DEBUG b.ged.ovgw.main.OVStreamReader 
 - startElement: uri=, localName=FinHdr, raw=FinHdr
31 May 2001 11:38:51,311 [           main] DEBUG b.ged.ovgw.main.OVStreamReader 
 - Got character data at p=36, l=5, Content ='
    '
31 May 2001 11:38:51,328 [           main] DEBUG b.ged.ovgw.main.OVStreamReader 
 - startElement: uri=, localName=Instrument, raw=Instrument
31 May 2001 11:38:51,329 [           main] DEBUG b.ged.ovgw.main.OVStreamReader 
 - Got character data at p=89, l=9, Content ='
        '
31 May 2001 11:38:51,333 [           main] DEBUG b.ged.ovgw.main.OVStreamReader 
 - startElement: uri=, localName=Exchange, raw=Exchange
31 May 2001 11:38:51,336 [           main] DEBUG b.ged.ovgw.main.OVStreamReader 
 - Got character data at p=108, l=5, Content ='Test'
31 May 2001 11:38:51,347 [           main] DEBUG b.ged.ovgw.main.OVStreamReader 
 - endElement namespaceURI=, localName = Exchange, qName = Exchange
31 May 2001 11:38:51,349 [           main] DEBUG b.ged.ovgw.main.OVStreamReader 
 - Got character data at p=124, l=5, Content ='
    '
31 May 2001 11:38:51,349 [           main] DEBUG b.ged.ovgw.main.OVStreamReader 
 - endElement namespaceURI=, localName = Instrument, qName = Instrument
31 May 2001 11:38:51,350 [           main] DEBUG b.ged.ovgw.main.OVStreamReader 
 - Got character data at p=142, l=1, Content ='
'
31 May 2001 11:38:51,351 [           main] DEBUG b.ged.ovgw.main.OVStreamReader 
 - endElement namespaceURI=, localName = FinHdr, qName = FinHdr
31 May 2001 11:38:51,358 [           main] WARN  b.ged.ovgw.main.OVStreamReader 
 - Exception


Thanks for any help!

James



--

This e-mail may contain confidential and/or privileged information. If you are 
not the intended recipient (or have received this e-mail in error) please 
notify the sender immediately and destroy this e-mail. Any unauthorised 
copying, disclosure or distribution of the material in this e-mail is strictly 
forbidden.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to