On Jan 25, 7:13 pm, "Steve" <[EMAIL PROTECTED]> wrote:
> Hi All,
>
> I've picked up thePyParsingmodule and am trying to figure out how to
> do a simple parsing of some HTML source code.  My specific problem is
> dealing with an <TD></TD> element that is blank.
>
<snip>
>
> Any assistance would be greatly appreciated!
>
> Steve

Just define a default value to be returned for MultiItem if the
Optional expression is not found:

    MultiItem = Optional(OneOrMore(dataItem),default="")

Define default to be whatever string you choose.

-- Paul

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to