Re: [WebDNA] Middle Question
This WebDNA talk-list message is from 2015
It keeps the original formatting.
numero = 112034
interpreted = N
texte = It seems to me this can be done with [regex]. Wait for 8.0.3- chris> On 23 Jan 2015, at 19:29, David Bastedo
wrote:>=20> Thanks Ken & Tom,>=20> as soon as I understood what Ken was saying, I knew what I want to do =is impossible>=20> I literally want to pluck open graph or other meta data off of a page, =no matter where it is by just using its tag and an end point.>=20> If I know what tags I am looking for explicitly - I could put them in =a table and loop through looking for whatever I wanted, then I could =define the end - working "forward" from the opening of the tag "og: =title" for example, and end at the close of the tag "/" and be able to =pull out dynamically any meta tag I could possibly think of.... or want.>=20> That would be pretty straight forward and very powerful.> I can accomplish this task by creating a one off relationship between =a page and its tags - say for twitter - its an easy way to grab an image =- but its not dynamic I want to do this for any type of page.>=20> d.>=20> On Fri, Jan 23, 2015 at 7:35 AM, Tom Duke =wrote:> David,>=20> Hi - you won't be able to achieve what you are trying to do with =[middle]. You might be able to hack something together using [grep] or =[listwords]. Though Stackoverflow is full of articles outlining why =regex should not be used to parse HTML. =(http://stackoverflow.com/questions/1732348/regex-match-open-tags-except-x=html-self-contained-tags/1732454#1732454)>=20> Your example shows why a proper HTML parser within WebDNA would be =really useful. For example if you paste your code into this page:>=20> http://try.jsoup.org>=20> and type "meta" into the CSS Query box you'll see how a HTML parser =does the job.>=20> - Tom>=20>=20>=20>=20>=20>=20> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D==3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D> Digital Revolutionaries> 1st Floor, Castleriver House> 14-15 Parliament Street> Temple Bar,Dublin 2> Ireland> ----------------------------------------------> [t]: + 353 1 4403907> [e]: > [w]: > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D==3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D>=20> On 23 January 2015 at 00:11, David Bastedo wrote:> To your point, I never switched out your test variable properly=20> To my point, I hate when you are right.> I get the same results.>=20> However, as opposed to blaming me for not understanding how the =friggin thing works, the docs aren't very clear and after seeing your =example I now understand "backwards" for the reality that it is.>=20> There is no hope in hell of doing what I want with middle.>=20> Your first example is not as good as your second example to illustrate =the concept. Thank you for taking the time with the second example, it =illustrate backwards much more effectively.>=20> d.>=20>=20> --------------------------------------------------------- This message =is sent to you because you are subscribed to the mailing list . To =unsubscribe, E-mail to: archives: =http://mail.webdna.us/list/talk@webdna.us Bug Reporting: =support@webdna.us>=20> --------------------------------------------------------- This message =is sent to you because you are subscribed to the mailing list . To =unsubscribe, E-mail to: archives: =http://mail.webdna.us/list/talk@webdna.us Bug Reporting: =support@webdna.us>=20>=20>=20> --=20> David Bastedo> Ten Plus One Communications Inc.> http://www.10plus1.com> 416.277.4499>=20> --------------------------------------------------------- This message =is sent to you because you are subscribed to the mailing list . To =unsubscribe, E-mail to: archives: =http://mail.webdna.us/list/talk@webdna.us Bug Reporting: =support@webdna.us
Associated Messages, from the most recent to the oldest:
It seems to me this can be done with [regex]. Wait for 8.0.3- chris> On 23 Jan 2015, at 19:29, David Bastedo wrote:>=20> Thanks Ken & Tom,>=20> as soon as I understood what Ken was saying, I knew what I want to do =is impossible>=20> I literally want to pluck open graph or other meta data off of a page, =no matter where it is by just using its tag and an end point.>=20> If I know what tags I am looking for explicitly - I could put them in =a table and loop through looking for whatever I wanted, then I could =define the end - working "forward" from the opening of the tag "og: =title" for example, and end at the close of the tag "/" and be able to =pull out dynamically any meta tag I could possibly think of.... or want.>=20> That would be pretty straight forward and very powerful.> I can accomplish this task by creating a one off relationship between =a page and its tags - say for twitter - its an easy way to grab an image =- but its not dynamic I want to do this for any type of page.>=20> d.>=20> On Fri, Jan 23, 2015 at 7:35 AM, Tom Duke =wrote:> David,>=20> Hi - you won't be able to achieve what you are trying to do with =[middle]. You might be able to hack something together using [grep] or =[listwords]. Though Stackoverflow is full of articles outlining why =regex should not be used to parse HTML. =(http://stackoverflow.com/questions/1732348/regex-match-open-tags-except-x=html-self-contained-tags/1732454#1732454)>=20> Your example shows why a proper HTML parser within WebDNA would be =really useful. For example if you paste your code into this page:>=20> http://try.jsoup.org>=20> and type "meta" into the CSS Query box you'll see how a HTML parser =does the job.>=20> - Tom>=20>=20>=20>=20>=20>=20> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D==3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D> Digital Revolutionaries> 1st Floor, Castleriver House> 14-15 Parliament Street> Temple Bar,Dublin 2> Ireland> ----------------------------------------------> [t]: + 353 1 4403907> [e]: > [w]: > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D==3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D>=20> On 23 January 2015 at 00:11, David Bastedo wrote:> To your point, I never switched out your test variable properly=20> To my point, I hate when you are right.> I get the same results.>=20> However, as opposed to blaming me for not understanding how the =friggin thing works, the docs aren't very clear and after seeing your =example I now understand "backwards" for the reality that it is.>=20> There is no hope in hell of doing what I want with middle.>=20> Your first example is not as good as your second example to illustrate =the concept. Thank you for taking the time with the second example, it =illustrate backwards much more effectively.>=20> d.>=20>=20> --------------------------------------------------------- This message =is sent to you because you are subscribed to the mailing list . To =unsubscribe, E-mail to: archives: =http://mail.webdna.us/list/talk@webdna.us Bug Reporting: =support@webdna.us>=20> --------------------------------------------------------- This message =is sent to you because you are subscribed to the mailing list . To =unsubscribe, E-mail to: archives: =http://mail.webdna.us/list/talk@webdna.us Bug Reporting: =support@webdna.us>=20>=20>=20> --=20> David Bastedo> Ten Plus One Communications Inc.> http://www.10plus1.com> 416.277.4499>=20> --------------------------------------------------------- This message =is sent to you because you are subscribed to the mailing list . To =unsubscribe, E-mail to: archives: =http://mail.webdna.us/list/talk@webdna.us Bug Reporting: =support@webdna.us
christophe.billiottet@webdna.us
DOWNLOAD WEBDNA NOW!
Top Articles:
Talk List
The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...
Related Readings:
Math with Time (1997)
Search for dates greater than [date] (1997)
search form problem.. (1997)
Triggers and today's leap day? (2000)
version 2 for NT (1997)
Sorting by date (1997)
Out of the woodwork (2007)
Quit revisited (1997)
Max Record length (1997)
WebDNA 6 (2004)
Shell traceroute (2001)
PCS Customer submissions ? (1997)
WebCat2 - [format thousands] (1997)
customer.db and forms (1999)
WebCat2.0b15-to many nested [xx] tags (1997)
WebCatalog + WebMerchant 2.1 for Windows released (1998)
webcat 2.1 (1997)
WC2b15 - [HTMLx]...[/HTMLx] problems SOLVED! (1997)
[protect admin] (1997)
Error Lob.db records error message not name (1997)