Meta Parse xml url

gerald0
Posts: 9
Joined: Sun Dec 02, 2001 3:46 pm

Meta Parse xml url

Post by gerald0 »

Thanks for answering my question, do you escape it like this? /= I'm not sure how to escape it. Can you also elaborate on the rex -x, is that a parser?
gerald0
Posts: 9
Joined: Sun Dec 02, 2001 3:46 pm

Meta Parse xml url

Post by gerald0 »

I think it should be like this:
<$imports= '#GOTO
multiple recexpr field Link varchar(80) />>\RclickUrl\\=\=\P=[^\"]+'> but this is not working either. Any help would be greatly appreciated.

Thanks,
Gerald
User avatar
mark
Site Admin
Posts: 5513
Joined: Tue Apr 25, 2000 6:56 pm

Meta Parse xml url

Post by mark »

"escape" is a single backslash ( \ ), not 2 as you have above.
/>>\RclickUrl\=\"\P=[^\"]+

rex is a command line file search utility, similar to grep. The -x option tells it to show you it's interpretation of your expression instead of doing any actual searching.
gerald0
Posts: 9
Joined: Sun Dec 02, 2001 3:46 pm

Meta Parse xml url

Post by gerald0 »

Mark and John, I wanted to thank you both for your assistance. I got it working as:
<$imports= '#OVERTURE
recdelim >><GotoResults
multiple
firstmatch
# Name Type Tag
field Title varchar />>\Rtitle\=\"\P=[^\"]+
field Abstract varchar />>\Rdescription\=\"\P=[^\"]+
field Link varchar />>\RclickUrl\=\"\P=[^\"]+
field ShowURL varchar />>\RsiteHost\=\"\P=[^\"]+
field Bid varchar />>\Rbid\=\"\P=[^\"]+
'>

One question though, do I need firstmatch? It appears to work fine without it, but from the description, I'm not exactly sure why I would need it.
User avatar
mark
Site Admin
Posts: 5513
Joined: Tue Apr 25, 2000 6:56 pm

Meta Parse xml url

Post by mark »

Without firstmatch timport will take all matches of a field within a record and concatenate them together. With firstmatch it will take only the first match and ignore the rest. If your records never have multiple matches per field you implicitly get firstmatch behavior. firstmatch is mostly for use with poorly structured data. You probably won't need it, but it won't hurt either. Personally I would remove it so when I looked at it a month from now I wouldn't think it was required and wonder why.
Post Reply