Hi Ramana, I was looking fo an alternative to Xerces for an applet to a webservice. I found these two links. http://www.devx.com/xml/Article/10114
http://www.javaworld.com/javaworld/javatips/jw-javatip128.html I really like Xerces, but to parse a command XML withing a trusted environment, it's a little overkill. These implementations purport to be around 4kb. I've also had more experience than I like remember about working with quasi-XML HTML sh*t. This is a royal pain and XML parsers neither Xerces, nor Crimson nor these dinky implementations will help. They will all abort about uselessly on something like "I <B><U><i>hate</b></U> HTML <br>". If you use Xerces (or the others), all you will get is "Eeeek, that's not XML". Your quandary is that if Xerces can load it, then it's OK. So a parser does you little good. Especially if it's very short, I suggest you just write the rules you want to enforce - matching tags, correct cases, correct nesting. (Hopefully you don't have entities, but even they won't kill you.) _________________________________________ Neil Pitman [EMAIL PROTECTED] +1.514.863.5465 ICQ#: 21101052 _________________________________________ ----- Original Message ----- From: "Paul Norris" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, August 29, 2003 12:33 AM Subject: RE: Handling tags > Hi Ramana, > > I guess what you're really after is a "tiny" XML parser. I'm not aware of > any, although somebody may have developed something suitable and posted it > on one of the many Java "resource" sites. Perhaps one of the other list > mmbers might know of something. > > If you can't find anything then you're left with two options: develop > something of your own, or use Xerces. I can't think of any reason that > might make you consider the first option for more than about 90 seconds... > You can do everything you need to in Xerces, it implements the standards > for XML, it's stable, it's powerful, and it's fast. The only real downside > is that it is pretty big. If you want to deploy this application across > the web, using Xerces will significantly increase the download time that > your users will experience. > > Having said all that, many of us would be only too happy to help you > through the process of creating an XML source that reads a string, and then > using a DefaultHandler to parse your string. > > Drop us a line if you decide to go with Xerces. > > Cheers, > Paul. > > -----Original Message----- > From: Jaladurgam, Ramana [SMTP:[EMAIL PROTECTED] > Sent: Friday, August 29, 2003 4:08 AM > To: '[EMAIL PROTECTED]' > Subject: Handling tags > > Hello, > I know this question is a out of scope of this list. But, I choose to > write this here because there will be a lot of tag parsing experts here. > The problem here: > I have a String returned from some program and it can contain > <U></U><B></B> and <I></I> tags. Meaning some thing like : > <B>H</B>E<U>LL</U>O. The string returned may or not may not contain the > tags. If they contain the tags, then I need to get the embeded token from > it. > I am also required to do error handling like > 1. There should be atleast one token between the tags, if there are > tags. > 2. The tag should be properly used. Meaning no start tag without > end > tag etc. > I don't want to use SAXhandler or DOM parser for this small strings. > Plan to do String processing. Please suggest me the solutions. I am new to > Java. > > Regards > Ramana.JV. > > > ************************************************************************ > **** > This email may contain confidential material. > If you were not an intended recipient, > Please notify the sender and delete all copies. > We may monitor email to and from our network. > ************************************************************************ > **** > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
