Hi, hopefully someone can finally answer a question on this forum for me.
I have such a strange problem and am tearing out my hair because of it.
I have build three SaxHandlers now w/o any problems,
I have built another to handle html,
its finding start and end tags fine, i can print these to my log, its laso finding attributes in the div tag,
this should have taken a few minutes to do but when i add in a simple if statement everything goes pare-shaped,
Ok in start elm i would have
if (localName.equalsIgnoreCase("div"))
idTag = attrs.getValue("id");
i would now print this to the log to see what the id tag contained and everything is fine!
when i try and do a simple if stament on it like so
if(idTag.contains("parent-fieldname"))
{
Log.v("parse","GO GO GO");
}
i also tried
if(idTad.equal("parent-fieldName"))
{
Do someting
}
It stops parsing with these if statments?? wtf?
is it something to do with processing inside the startElm or endElm methods?
I'm completely at a loss.
Thanks
heres some code
@Override
public void startElement(String uri, String localName,String qName, Attributes attrs) throws SAXException
{
//Log.v("parse","Start elm = "+localName);
// If Div tag get attributes
if (localName.equalsIgnoreCase("div"))
{
idTag = attrs.getValue("id");
Log.v("parse","start div = "+localName);
Log.v("parse","idTag ="+idTag);
//idTag.trim();
if(idTag.equals("parent-fieldname"))
{
Log.v("parse","GO GO GO)");
}
//Log.v("parse","id = "+id);
// Add identifier1 to Database
// next add the found title to databse
}
// Get resources information
}


