[Home] [By Thread] [By Date] [Recent Entries]


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

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member