OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [xml-dev] Control characters in node value



Michael Kay wrote:

> > I am using IBM's XML4J parser. I need to parse certain XML that is of
> > the following form.
> >
> > <?xml version="1.0"?>
> > <A>
> >  <B>#java.sql.SQLException:
> > oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java)
> >  </B>
> > </A>
> >
> This isn't XML, so you can't parse it. An XML parser will throw an error
> saying that the <init> start tag has no matching end tag.

To fix this, whoever constructs the XML needs to use references to the
lt and gt entities instead of the < and > characters. For example:

 <?xml version="1.0"?>
 <A>
  <B>#java.sql.SQLException:
 oracle.jdbc.driver.OracleConnection.&lt;init&gt;(OracleConnection.java)
  </B>
 </A>

-- Ron