Re: [BULK] [WebDNA] [BULK] [middle] behavior

This WebDNA talk-list message is from

2020


It keeps the original formatting.
numero = 115054
interpreted = N
texte = 2683 --Apple-Mail=_6BF79C96-E4D3-48DF-9701-919320AE6A3B Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Hey Steve Have a go at parsing the xml, once you get the hang of it you will find = it very good: http://webdna.us/page.dna?numero=3D284 Kind regards Stuart Tremain Pharoah Lane Software AUSTRALIA webdna@plsoftware.com.au > On 29 Feb 2020, at 05:41, talk@webdna.us wrote: >=20 > Thanks Brian for your helpful reply >=20 > On 2/28/20 1:30 PM, talk@webdna.us wrote: >> Your code is actually returning the whole string, but the angle = brackets are being hidden by the HTML processor. You can see the full = string with: >>=20 >> [grep search=3D<&replace=3D[url]<[/url]][middle = startafter=3D&endbefore=3D][reply][/middle][/grep] >>=20 >>=20 >> The way MIDDLE works is that if the =E2=80=9Cstartafter=E2=80=9D = string is not found, it starts at the beginning of the string, and if = the =E2=80=9Cendbefore" string is not found it goes to the end of the = string. >>=20 >> So, if items are optional in the reply, one option is to use = something like: >>=20 >> [showif [url][reply][/url]^[url][/url]][middle = startafter=3D&endbefore=3D][reply][/middle][/showif] >>=20 >> - Brian Fries >>=20 >>> On Feb 28, 2020, at 9:09 AM, talk@webdna.us wrote: >>>=20 >>> sorry the middle code is: >>> [middle startafter=3D&endbefore=3D][reply][/middle] >>>=20 >>> On 2/28/20 12:07 PM, talk@webdna.us wrote: >>>> Hi all, >>>>=20 >>>> I am using [middle] to parse some XML. >>>>=20 >>>> My Webdna is as follows: >>>>=20 >>>> = [text]reply=3D23.81.80.158391204864= 39120563123.81.80.0/23, = 23.81.82.0/24US"UNITED = STATES"37.751-97.8225000-05:00<= /TIMEZONE>LEASEWEB USA = INC.LEASEWEB.COMT1= TODOTODO5391205022= 23.81.80.158.USA-IDC.COMUSA-IDC.COM[/text] >>>>=20 >>>> Neither or exists. >>>>=20 >>>> Should not the result of [middle] be nothing/blank? >>>> [middle startafter=3D&endbefore=3D[][reply][/middle]= >>>>=20 >>>> I am getting: >>>> 23.81.80.15839120486439120563123.81.80.0/23, 23.81.82.0/24USUNITED = STATES37.751-97.8225000-05:00LEASEWEB USA = INC.LEASEWEB.COMT1TODOTODO539120502223.81.80.158.USA-IDC.COMUSA-IDC.COM >>>>=20 >>>> Thanks in advance >>>>=20 >>>>=20 >>>>=20 >>> --=20 >>> Steve Raslevich >>> --------------------------------------------------------- >>> This message is sent to you because you are subscribed to >>> the mailing list talk@webdna.us >>> To unsubscribe, E-mail to: talk-leave@webdna.us >>> archives: http://www.webdna.us/page.dna?numero=3D55 >>> Bug Reporting: support@webdna.us >> --------------------------------------------------------- >> This message is sent to you because you are subscribed to >> the mailing list talk@webdna.us >> To unsubscribe, E-mail to: talk-leave@webdna.us >> archives: http://www.webdna.us/page.dna?numero=3D55 >> Bug Reporting: support@webdna.us >=20 > --=20 > Steve Raslevich > --------------------------------------------------------- > This message is sent to you because you are subscribed to > the mailing list talk@webdna.us > To unsubscribe, E-mail to: talk-leave@webdna.us > archives: http://www.webdna.us/page.dna?numero=3D55 > Bug Reporting: support@webdna.us --Apple-Mail=_6BF79C96-E4D3-48DF-9701-919320AE6A3B Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8 Hey = Steve

Have a go at = parsing the xml, once you get the hang of it you will find it very = good:



Kind regards

Stuart Tremain
Pharoah Lane Software
AUSTRALIA







On 29 Feb 2020, at 05:41, talk@webdna.us wrote:

Thanks= Brian for your helpful reply

On 2/28/20 = 1:30 PM, talk@webdna.us = wrote:
Your code is = actually returning the whole string, but the angle brackets are being = hidden by the HTML processor. You can see the full string with:

[grep = search=3D<&replace=3D[url]&lt;[/url]][middle = startafter=3D<region>&endbefore=3D</region>][reply][/middl= e][/grep]


The way MIDDLE = works is that if the =E2=80=9Cstartafter=E2=80=9D string is not found, = it starts at the beginning of the string, and if the =E2=80=9Cendbefore" = string is not found it goes to the end of the string.

So, if items are optional in the reply, one option is to use = something like:

[showif = [url][reply][/url]^[url]<region>[/url]][middle = startafter=3D<region>&endbefore=3D</region>][reply][/middl= e][/showif]

- Brian Fries

On Feb 28, 2020, at 9:09 = AM, talk@webdna.us = wrote:

sorry the middle code is:
[middle = startafter=3D<region>&endbefore=3D</region>][reply][/middl= e]

On 2/28/20 12:07 PM, talk@webdna.us wrote:
Hi all,

I am using [middle] to parse some XML.

My Webdna is as follows:

[text]reply=3D<IP>23.81.80.158</IP><NETWORK>3= 91204864</NETWORK><BROADCAST>391205631</BROADCAST><CI= DR>23.81.80.0/23, = 23.81.82.0/24</CIDR><COUNTRYCODE>US</COUNTRYCODE><COU= NTRYNAME>"UNITED = STATES"</COUNTRYNAME><REGION/><CITY/><LATITUDE>37.= 751</LATITUDE><LONGITUDE>-97.822</LONGITUDE><LATLONRA= D>5000</LATLONRAD><ZIPCODE/><TIMEZONE>-05:00</TIME= ZONE><ISPNAME>LEASEWEB USA = INC.</ISPNAME><DOMAINNAME>LEASEWEB.COM</DOMAINNAME><NETSPEED>T1</NETSP= EED><CONTINENTNAME>TODO</CONTINENTNAME><CONTINENTCODE>= ;TODO</CONTINENTCODE><THREATRATING>5</THREATRATING><I= PWHOIS/><DOMAINWHOIS/><IPNUM>391205022</IPNUM><RDN= SHOST>23.81.80.158.USA-IDC.COM</RDNSHOST><RDNSDOMAIN>USA-IDC.COM</RDNSDOMAIN>[/text]

Neither <region> or </region> exists.

Should not the result of [middle] be = nothing/blank?
[middle = startafter=3D<region>&endbefore=3D[</region>][reply][/midd= le]

I am getting:
23.81.80.15839120486439120563123.81.80.0/23, = 23.81.82.0/24USUNITED STATES37.751-97.8225000-05:00LEASEWEB USA = INC.LEASEWEB.COMT1TODOTODO539120502223.81.80.158.USA-IDC.COMUSA-IDC.COM

Thanks = in advance



--
Steve Raslevich
---------------------------------------------------------
This message is sent to you because you are subscribed to
the mailing list talk@webdna.us
To unsubscribe, E-mail to: = talk-leave@webdna.us
archives: http://www.webdna.us/page.dna?numero=3D55
Bug= Reporting: support@webdna.us
--------------------------------------------------= -------
This message is sent to you because you are = subscribed to
the mailing list talk@webdna.us
To unsubscribe, E-mail to: talk-leave@webdna.us
archives: http://www.webdna.us/page.dna?numero=3D55
Bug= Reporting: support@webdna.us

--
Steve Raslevich
---------------------------------------------------------
This message is sent to you because you are subscribed to
the mailing list talk@webdna.us
To unsubscribe, E-mail to: = talk-leave@webdna.us
archives: http://www.webdna.us/page.dna?numero=3D55
Bug= Reporting: support@webdna.us

= --------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list talk@webdna.us To unsubscribe, E-mail to: talk-leave@webdna.us archives: http://www.webdna.us/page.dna?numero=3D55 Bug Reporting: support@webdna.us --Apple-Mail=_6BF79C96-E4D3-48DF-9701-919320AE6A3B-- . Associated Messages, from the most recent to the oldest:

    
  1. Re: [BULK] [WebDNA] [BULK] [middle] behavior (webdna 2020)
  2. Re: [BULK] [WebDNA] [BULK] [middle] behavior (Stuart Tremain 2020)
2683 --Apple-Mail=_6BF79C96-E4D3-48DF-9701-919320AE6A3B Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Hey Steve Have a go at parsing the xml, once you get the hang of it you will find = it very good: http://webdna.us/page.dna?numero=3D284 Kind regards Stuart Tremain Pharoah Lane Software AUSTRALIA webdna@plsoftware.com.au > On 29 Feb 2020, at 05:41, talk@webdna.us wrote: >=20 > Thanks Brian for your helpful reply >=20 > On 2/28/20 1:30 PM, talk@webdna.us wrote: >> Your code is actually returning the whole string, but the angle = brackets are being hidden by the HTML processor. You can see the full = string with: >>=20 >> [grep search=3D<&replace=3D[url]<[/url]][middle = startafter=3D&endbefore=3D][reply][/middle][/grep] >>=20 >>=20 >> The way MIDDLE works is that if the =E2=80=9Cstartafter=E2=80=9D = string is not found, it starts at the beginning of the string, and if = the =E2=80=9Cendbefore" string is not found it goes to the end of the = string. >>=20 >> So, if items are optional in the reply, one option is to use = something like: >>=20 >> [showif [url][reply][/url]^[url][/url]][middle = startafter=3D&endbefore=3D][reply][/middle][/showif] >>=20 >> - Brian Fries >>=20 >>> On Feb 28, 2020, at 9:09 AM, talk@webdna.us wrote: >>>=20 >>> sorry the middle code is: >>> [middle startafter=3D&endbefore=3D][reply][/middle] >>>=20 >>> On 2/28/20 12:07 PM, talk@webdna.us wrote: >>>> Hi all, >>>>=20 >>>> I am using [middle] to parse some XML. >>>>=20 >>>> My Webdna is as follows: >>>>=20 >>>> = [text]reply=3D23.81.80.158391204864= 39120563123.81.80.0/23, = 23.81.82.0/24US"UNITED = STATES"37.751-97.8225000-05:00<= /TIMEZONE>LEASEWEB USA = INC.LEASEWEB.COMT1= TODOTODO5391205022= 23.81.80.158.USA-IDC.COMUSA-IDC.COM[/text] >>>>=20 >>>> Neither or exists. >>>>=20 >>>> Should not the result of [middle] be nothing/blank? >>>> [middle startafter=3D&endbefore=3D[][reply][/middle]= >>>>=20 >>>> I am getting: >>>> 23.81.80.15839120486439120563123.81.80.0/23, 23.81.82.0/24USUNITED = STATES37.751-97.8225000-05:00LEASEWEB USA = INC.LEASEWEB.COMT1TODOTODO539120502223.81.80.158.USA-IDC.COMUSA-IDC.COM >>>>=20 >>>> Thanks in advance >>>>=20 >>>>=20 >>>>=20 >>> --=20 >>> Steve Raslevich >>> --------------------------------------------------------- >>> This message is sent to you because you are subscribed to >>> the mailing list talk@webdna.us >>> To unsubscribe, E-mail to: talk-leave@webdna.us >>> archives: http://www.webdna.us/page.dna?numero=3D55 >>> Bug Reporting: support@webdna.us >> --------------------------------------------------------- >> This message is sent to you because you are subscribed to >> the mailing list talk@webdna.us >> To unsubscribe, E-mail to: talk-leave@webdna.us >> archives: http://www.webdna.us/page.dna?numero=3D55 >> Bug Reporting: support@webdna.us >=20 > --=20 > Steve Raslevich > --------------------------------------------------------- > This message is sent to you because you are subscribed to > the mailing list talk@webdna.us > To unsubscribe, E-mail to: talk-leave@webdna.us > archives: http://www.webdna.us/page.dna?numero=3D55 > Bug Reporting: support@webdna.us --Apple-Mail=_6BF79C96-E4D3-48DF-9701-919320AE6A3B Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8 Hey = Steve

Have a go at = parsing the xml, once you get the hang of it you will find it very = good:



Kind regards

Stuart Tremain
Pharoah Lane Software
AUSTRALIA







On 29 Feb 2020, at 05:41, talk@webdna.us wrote:

Thanks= Brian for your helpful reply

On 2/28/20 = 1:30 PM, talk@webdna.us = wrote:
Your code is = actually returning the whole string, but the angle brackets are being = hidden by the HTML processor. You can see the full string with:

[grep = search=3D<&replace=3D[url]&lt;[/url]][middle = startafter=3D<region>&endbefore=3D</region>][reply][/middl= e][/grep]


The way MIDDLE = works is that if the =E2=80=9Cstartafter=E2=80=9D string is not found, = it starts at the beginning of the string, and if the =E2=80=9Cendbefore" = string is not found it goes to the end of the string.

So, if items are optional in the reply, one option is to use = something like:

[showif = [url][reply][/url]^[url]<region>[/url]][middle = startafter=3D<region>&endbefore=3D</region>][reply][/middl= e][/showif]

- Brian Fries

On Feb 28, 2020, at 9:09 = AM, talk@webdna.us = wrote:

sorry the middle code is:
[middle = startafter=3D<region>&endbefore=3D</region>][reply][/middl= e]

On 2/28/20 12:07 PM, talk@webdna.us wrote:
Hi all,

I am using [middle] to parse some XML.

My Webdna is as follows:

[text]reply=3D<IP>23.81.80.158</IP><NETWORK>3= 91204864</NETWORK><BROADCAST>391205631</BROADCAST><CI= DR>23.81.80.0/23, = 23.81.82.0/24</CIDR><COUNTRYCODE>US</COUNTRYCODE><COU= NTRYNAME>"UNITED = STATES"</COUNTRYNAME><REGION/><CITY/><LATITUDE>37.= 751</LATITUDE><LONGITUDE>-97.822</LONGITUDE><LATLONRA= D>5000</LATLONRAD><ZIPCODE/><TIMEZONE>-05:00</TIME= ZONE><ISPNAME>LEASEWEB USA = INC.</ISPNAME><DOMAINNAME>LEASEWEB.COM</DOMAINNAME><NETSPEED>T1</NETSP= EED><CONTINENTNAME>TODO</CONTINENTNAME><CONTINENTCODE>= ;TODO</CONTINENTCODE><THREATRATING>5</THREATRATING><I= PWHOIS/><DOMAINWHOIS/><IPNUM>391205022</IPNUM><RDN= SHOST>23.81.80.158.USA-IDC.COM</RDNSHOST><RDNSDOMAIN>USA-IDC.COM</RDNSDOMAIN>[/text]

Neither <region> or </region> exists.

Should not the result of [middle] be = nothing/blank?
[middle = startafter=3D<region>&endbefore=3D[</region>][reply][/midd= le]

I am getting:
23.81.80.15839120486439120563123.81.80.0/23, = 23.81.82.0/24USUNITED STATES37.751-97.8225000-05:00LEASEWEB USA = INC.LEASEWEB.COMT1TODOTODO539120502223.81.80.158.USA-IDC.COMUSA-IDC.COM

Thanks = in advance



--
Steve Raslevich
---------------------------------------------------------
This message is sent to you because you are subscribed to
the mailing list talk@webdna.us
To unsubscribe, E-mail to: = talk-leave@webdna.us
archives: http://www.webdna.us/page.dna?numero=3D55
Bug= Reporting: support@webdna.us
--------------------------------------------------= -------
This message is sent to you because you are = subscribed to
the mailing list talk@webdna.us
To unsubscribe, E-mail to: talk-leave@webdna.us
archives: http://www.webdna.us/page.dna?numero=3D55
Bug= Reporting: support@webdna.us

--
Steve Raslevich
---------------------------------------------------------
This message is sent to you because you are subscribed to
the mailing list talk@webdna.us
To unsubscribe, E-mail to: = talk-leave@webdna.us
archives: http://www.webdna.us/page.dna?numero=3D55
Bug= Reporting: support@webdna.us

= --------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list talk@webdna.us To unsubscribe, E-mail to: talk-leave@webdna.us archives: http://www.webdna.us/page.dna?numero=3D55 Bug Reporting: support@webdna.us --Apple-Mail=_6BF79C96-E4D3-48DF-9701-919320AE6A3B-- . Stuart Tremain

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:

Auto conversion of URLs? (1998) Email within tmpl ? (1997) Printing a final order (1997) Search-context (1999) Special characters in field names (1998) Help name our technology! (1997) New Command prefs ... (1997) Nested search (1997) ACGI processing for .html (1997) Summing fields (1997) tax rate off by 1 cent (1997) Linux/webcat points (2000) [TaxableTotal] - not working with AOL and IE (1997) Speed questions (1998) WebCat2.0 acgi vs plugin (1997) WebDNA Running Out of RAM? (2004) [WebDNA] WebDNA restart script (2015) Slow [spawn] (2003) ShowNext Command (1997) find with exceptions (1997)