string parser

R

RobcPettit

hi Im using a ravsoft string passer class and I get errors with;
string strQuote = "";
string str = "..."; // HTML
StringParser p = new StringParser (str);
if (p.skipToEndOfNoCase ("<td><span
class="GlobalBoldedText">") &&
p.extractTo ("</td>", ref strQuote));
Console.WriteLine ("MSFT (delayed) = {0}", strQuote);

}
Where "GlobalBoldedText" is, its underlined and it wants ), the end
brackets is invalid expression ter. If i remove the "" around
GlobalBoldedTex then it will complie, but then it wont find the string.
Any Ideas.
Regards Robert
 
C

Chris Dunaway

I don't know anything about that stringparser, but it looks like the
quotes are fouling you up. Try escaping the quotes around
GlobalBoldedText like this:

if (p.skipToEndOfNoCase("<td><span class=\"GlobalBoldedText\">") ....

and see if that helps.
 
R

RobcPettit

Thamks for you reply, that got rid of the errors. So its to do with the
quotes, problem is, it wont parse the info because \ are not in the
original HTML. At least ive an idea of were to look.
Regards Robert
 
C

Chris Dunaway

The \ will not be included in the final string, they just escape the
quotation marks. The final string should only have the quotation marks.
 
R

RobcPettit

Thankd Chris. I think its how Im parsing the html. The lines there but
cant get to it.
Regards Robert
 
Top