Re: [WebDNA] XML parsing issue with cdata

This WebDNA talk-list message is from

2012


It keeps the original formatting.
numero = 109151
interpreted = N
texte = --Apple-Mail=_7F5E84A9-4DEA-4C43-8506-5E6616028E77 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=iso-8859-1 [!] -------------- WRITE RESULT TO FILE -------------- [/!] [WRITEFILE file=3Dinclude/hosom/RESULTDATA/NEWDATA-[DATE %Y%m%d]-[TIME = %H%M].xml][RESULTDATA][/WRITEFILE] [!] -------------- Get Ready to append XML data to a database. = -------------- [/!] [xsl var=3Dxsl_ORDER1][INCLUDE file=3D^XML/XML-order-stylesheet.inc][/XSL]= [text]RESULT=3D[unurl][xslt = xslref=3Dxsl_ORDER1][RESULTDATA][/xslt][/unurl][/text] [!] -------------- Interpret [RESULT] to 'parse' WebDNA code and do the = APPEND. -------------- [/!] [interpret][RESULT][/interpret] Here is the style sheet, the trick is to write your WebDNA with URL'd = brackets ie %5B/REPLACE%5D instead of [/REPLACE] and check the way that = & is URL'd. The reason that this is done is that if you use [ or ] it = will interpret the WebDNA before you really want to use it, hence the = [interpret][RESULT][/interpret] Sorry, you will have to read around the LISTWORDS stuff. %5BREPLACE = db=3D^data/HOSOMorders.db[url]&[/url]eqX-AUTOIDdata=3D[url]&[/url]append=3D= T%5D[LISTWORDS words=3D[INCLUDE = file=3D^XML/XML-Fields-C.inc]&delimiters=3D,]X-[WORD][ShowIf [INCLUDE = file=3D^XML/duplicate-field-names.inc]^|[WORD]|]-CUSTOMER[/ShowIf]=3D[URL]&[/URL][/LISTWORDS][!] [/!][LISTWORDS words=3D[INCLUDE = file=3D^XML/XML-Fields-O.inc]&delimiters=3D,]X-[WORD][ShowIf [INCLUDE = file=3D^XML/duplicate-field-names.inc]^|[WORD]|]-ORDER[/ShowIf]=3D[URL]&[/URL][/LISTWORDS]X-ThisOrder=3D[TEXT = SHOW=3DT]X-ThisOrder=3D-[URL]&[/URL]X-STOREID-LINEITEM=3D[URL]&[/URL]X-ORDERID=3D[URL]&[/URL]X-AUTOID=3DCUSTOMER[/TEXT][!] [/!][!]CLOSES O[/!]%5B/REPLACE%5D %5BREPLACE = db=3D^data/HOSOMorders.db[url]&[/url]eqX-AUTOIDdata=3D[url]&[/url]append=3D= T%5DX-ThisOrder=3D-[URL]&[/URL][LISTWORDS words=3D[INCLUDE = file=3D^XML/XML-Fields-OE.inc]&delimiters=3D,]X-[WORD][ShowIf [INCLUDE = file=3D^XML/duplicate-field-names.inc]^|[WORD]|]-LINEITEM[/ShowIf]=3D[URL]&[/URL][/LISTWORDS]%5B/REPLACE%5D [!]CLOSES O[/!] On 28/05/2012, at 12:22 PM, David Bastedo wrote: > Hmm. i am stuck again it seems, I can get the data via xlst, but = writing it to a db seems really awkward, i think I need to look at = another solution. So how do you use middle to get the value to actually = show up? >=20 > d. >=20 >=20 >=20 > On Sun, May 27, 2012 at 7:23 PM, Stuart Tremain = wrote: > I use MIDDLE to get past the [CDATA >=20 >=20 > On 27/05/2012, at 1:35 AM, David Bastedo wrote: >=20 >> Hi, has anybody run into the following xml parsing issue? >>=20 >> The node: >> =20 >> I can see the content I want in an xml file. in the CDATA abvoe - = being the content of a tweet "RT @BoyTopi: I want to feel snow! Not the = fake ones at Snow City." >>=20 >> the value of the "text" node returns a blank.=20 >>=20 >> if I get a node attribute of "text" then I get a return name value of = "#cdata-section" and no "value" >>=20 >> How do I get to the CDATA information in the following example. >>=20 >> Any ideas? Is there something I am missing? >>=20 >> thanks. >>=20 >> d. >>=20 >> sample: xml >> >> >> tweets_locarea >> 206405518925905920 >> 1338045885 >> >> >> 803 >> >> Hesperia_WX >> 25 >> unknown >> = >> >> >> US >> United States Of America >> 1 >> USCA0481 >> CA >> Hesperia >> >> >> >>=20 >> sample parse >>=20 >> --tweet:=20 >> ---klass: tweets_locarea >> ---tweetId: 206405503587328000 >> ---date: 1338045881 >> ---text:=20 >> ----#cdata-section: ------------------> the offending line >> ---sentiment:=20 >> ---dma: 803 >> ---tweeter:=20 >> ----screenName: HeyAbbie_ >> ----influence: 27 >> ----gender: female >> ----profileImageURL:=20 >> -----#cdata-section: ------------------> the offending line >> ---location:=20 >> ----countryCode: US >> ----country: United States Of America >> ----type: 1 >> ----id: USCA0638 >> ----state: CA >> ----name: Los Angeles >>=20 >> =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 >=20 >=20 > --=20 > David Bastedo > Ten Plus One Communications Inc. > http://www.10plus1.com > 416.277.4499 > My Profiles =20 > Find me on davidbmbastedo@gmail.com > My Latest Shared Link is: QR code stickers turn real-world objects = into digital conversations | Springwise >=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 --Apple-Mail=_7F5E84A9-4DEA-4C43-8506-5E6616028E77 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=iso-8859-1
[!] --------------  WRITE RESULT TO FILE -------------- = [/!]
[WRITEFILE = file=3Dinclude/hosom/RESULTDATA/NEWDATA-[DATE %Y%m%d]-[TIME = %H%M].xml][RESULTDATA][/WRITEFILE]


[!] --------------  Get Ready to append XML = data to a database. -------------- [/!]
[xsl var=3Dxsl_ORDER1][INCLUDE = file=3D^XML/XML-order-stylesheet.inc][/XSL]
[text]RESULT=3D[unurl][xslt = xslref=3Dxsl_ORDER1][RESULTDATA][/xslt][/unurl][/text]


[!] --------------  Interpret = [RESULT] to 'parse' WebDNA code and do the APPEND.  -------------- = [/!]
[interpret][RESULT][/interpret]


Here is the style sheet, the trick = is to write your WebDNA with URL'd brackets ie  %5B/REPLACE%5D = instead of [/REPLACE] and check the way that & is URL'd. The = reason that this is done is that if you use [ or ] it will interpret the = WebDNA before you really want to use it, hence = the [interpret][RESULT][/interpret]

Sorry, you will have to read around the LISTWORDS stuff.


<xsl:stylesheet version=3D"1.0" = xmlns:xsl=3D"http://www.w3.org/1999/XSL/T= ransform">
<xsl:template match=3D"/">
<xsl:for-each select=3D"HOSOMC/C">

%5BREPLACE = db=3D^data/HOSOMorders.db[url]&[/url]eqX-AUTOIDdata=3D[url]&[/url]= append=3DT%5D[LISTWORDS words=3D[INCLUDE = file=3D^XML/XML-Fields-C.inc]&delimiters=3D,]X-[WORD][ShowIf = [INCLUDE = file=3D^XML/duplicate-field-names.inc]^|[WORD]|]-CUSTOMER[/ShowIf]=3D<xsl:value-of = select=3D"[URL][WORD][/URL]"/>[URL]&[/URL][/LISTWORDS][!]
[/!]<xsl:for-each = select=3D"O">[LISTWORDS words=3D[INCLUDE = file=3D^XML/XML-Fields-O.inc]&delimiters=3D,]X-[WORD][ShowIf = [INCLUDE = file=3D^XML/duplicate-field-names.inc]^|[WORD]|]-ORDER[/ShowIf]=3D<xsl:value-of select=3D"[If = ("[WORD]"^"COMMENT")][Then][URL][URL][WORD][/URL][/URL][/Then][Else][URL][= WORD][/URL][/Else][/If]"/>[URL]&[/URL][/LISTWORDS]X-ThisOrde= r=3D[TEXT SHOW=3DT]X-ThisOrder=3D<xsl:value-of select=3D"StoreID"/>-<xsl:value-of = select=3D"ID"/>[URL]&[/URL]X-STOREID-LINEITEM=3D<xsl:value-of = select=3D"StoreID"/>[URL]&[/URL]X-ORDERID=3D<xsl:value-of = select=3D"ID"/>[URL]&[/URL]X-AUTOID=3DCUSTOMER[/TEXT][!]
[/!]</xsl:for-each>[!]CLOSES = O[/!]%5B/REPLACE%5D

<xsl:for-each select=3D"O"><xsl:for-each= select=3D"OE">%5BREPLACE = db=3D^data/HOSOMorders.db[url]&[/url]eqX-AUTOIDdata=3D[url]&[/url]= append=3DT%5DX-ThisOrder=3D<xsl:value-of select=3D"StoreID"/>-<xsl:value-of = select=3D"OrderID"/>[URL]&[/URL][LISTWORDS words=3D[INCLUDE = file=3D^XML/XML-Fields-OE.inc]&delimiters=3D,]X-[WORD][ShowIf = [INCLUDE = file=3D^XML/duplicate-field-names.inc]^|[WORD]|]-LINEITEM[/ShowIf]=3D<xsl:value-of = select=3D"[URL][WORD][/URL]"/>[URL]&[/URL][/LISTWORDS]%5B/RE= PLACE%5D

</xsl:for-each></xsl:for-each>[!]CLOSES = O[/!]

</xsl:for-each>
</xsl:template>
</xsl:stylesheet>





On 28/05/2012, at = 12:22 PM, David Bastedo wrote:

Hmm. i am = stuck again it seems, I can get the data via xlst, but writing it to a = db seems really awkward, i think I need to look at another solution. So = how do you use middle to get the value to actually show = up?

d.
=


On Sun, May 27, 2012 at 7:23 PM, = Stuart Tremain <webdna@idfk.com.au> = wrote:
I use MIDDLE to get past the = [CDATA


On = 27/05/2012, at 1:35 AM, David Bastedo = wrote:

Hi, has anybody run into the following xml parsing = issue?

The node:   <text><![CDATA[RT @BoyTopi: I = want to feel snow! Not the fake ones at Snow = City.]]></text>
 
I can see the content I want in an = xml file. in the CDATA abvoe - being the content of a tweet "RT = @BoyTopi: I want to feel snow! Not the fake ones at Snow City."

the value of the "text" node returns a blank.

if I get a = node attribute of "text" then I get a return name value of = "#cdata-section" and no "value"

How do I get to the CDATA = information in the following example.

Any ideas? Is there something I am = missing?

thanks.

d.

sample: = xml
<tweets>  <tweet>    =<klass>tweets_locarea<=span></klass>    =<tweetid>206405518925905920</tweetid>    =<date>1338045885=</date>    =<text><!--[CD=ATA[HA: Fair and Breezy and 50 F at Southern California Logisitics =Airport, CA Winds are from the West at 20.7 gusting to 2 http://t.co/KqLrqbuk]]--></text>    =<sentiment>    =<dma>803</dma>    <tweeter>      =<screenname>Hesperia_WX</screenname>      =<influence>25<=;/influence>      =<gender>unknown&=lt;/gender>      =<profileimageurl><!--[CDATA[http://a0.twimg.com/profile_images/383407737/Official_SW=AS_logo_normal.jpg]]--></profile=imageurl>    </tweeter>    <location>      =<countrycode>US&=lt;/countrycode>      =<country>United States Of =America</country>      =<type>1</type>      =<id>USCA0481<=/id>      =<state>CA</state>      =<name>Hesperia&l=t;/name>    =</location>  =</sentiment><=/tweet>  =<tweet>

sampl= e parse

--tweet:=20
=20 ---klass: tweets_locarea
=20 =20 =20 =20 ---tweetId: 206405503587328000
=20 =20 =20 =20 ---date: 1338045881
=20 =20 =20 =20 ---text:
=20 =20 =20 =20 ----#cdata-section: ------------------> the offending line
=20 =20 =20 ---sentiment:
=20 =20 =20 =20 ---dma: 803
=20 =20 =20 =20 ---tweeter:=20
=20 =20 =20 =20 ----screenName: HeyAbbie_
=20 =20 =20 ----influence: 27
=20 =20 =20 ----gender: female
=20 =20 =20 ----profileImageURL:
=20 =20 =20 -----#cdata-section: ------------------> the offending line
=20 =20 ---location:=20
=20 =20 =20 =20 ----countryCode: US
=20 =20 =20 ----country: United States Of America
=20 =20 =20 ----type: 1
=20 =20 =20 ----id: USCA0638
=20 =20 =20 ----state: CA
=20 =20 =20 ----name: Los Angeles

 

--------------------------------------------------------- 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
--------------------------------------------------------- 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



--


=
--
David = Bastedo
Ten Plus One Communications Inc.
http://www.10plus1.com
416.277.4499
My Profiles 3D"Twitter"=3D"Google"
Find me on 3D"Google davidbmbastedo@gmail.com

--------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: archives: http://mail.webdna.us/l= ist/talk@webdna.us Bug Reporting: support@webdna.us

= --Apple-Mail=_7F5E84A9-4DEA-4C43-8506-5E6616028E77-- Associated Messages, from the most recent to the oldest:

    
  1. Re: [WebDNA] XML parsing issue with cdata (David Bastedo 2012)
  2. Re: [WebDNA] XML parsing issue with cdata (David Bastedo 2012)
  3. Re: [WebDNA] XML parsing issue with cdata (Stuart Tremain 2012)
  4. Re: [WebDNA] XML parsing issue with cdata (David Bastedo 2012)
  5. Re: [WebDNA] XML parsing issue with cdata (Stuart Tremain 2012)
  6. Re: [WebDNA] XML parsing issue with cdata (Stuart Tremain 2012)
  7. Re: [WebDNA] XML parsing issue with cdata (David Bastedo 2012)
  8. Re: [WebDNA] XML parsing issue with cdata (David Bastedo 2012)
  9. Re: [WebDNA] XML parsing issue with cdata (David Bastedo 2012)
  10. Re: [WebDNA] XML parsing issue with cdata (Donovan Brooke 2012)
  11. Re: [WebDNA] XML parsing issue with cdata (D Brooke 2012)
  12. [WebDNA] XML parsing issue with cdata (David Bastedo 2012)
--Apple-Mail=_7F5E84A9-4DEA-4C43-8506-5E6616028E77 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=iso-8859-1 [!] -------------- WRITE RESULT TO FILE -------------- [/!] [WRITEFILE file=3Dinclude/hosom/RESULTDATA/NEWDATA-[DATE %Y%m%d]-[TIME = %H%M].xml][RESULTDATA][/WRITEFILE] [!] -------------- Get Ready to append XML data to a database. = -------------- [/!] [xsl var=3Dxsl_ORDER1][INCLUDE file=3D^XML/XML-order-stylesheet.inc][/XSL]= [text]RESULT=3D[unurl][xslt = xslref=3Dxsl_ORDER1][RESULTDATA][/xslt][/unurl][/text] [!] -------------- Interpret [RESULT] to 'parse' WebDNA code and do the = APPEND. -------------- [/!] [interpret][RESULT][/interpret] Here is the style sheet, the trick is to write your WebDNA with URL'd = brackets ie %5B/REPLACE%5D instead of [/REPLACE] and check the way that = & is URL'd. The reason that this is done is that if you use [ or ] it = will interpret the WebDNA before you really want to use it, hence the = [interpret][RESULT][/interpret] Sorry, you will have to read around the LISTWORDS stuff. %5BREPLACE = db=3D^data/HOSOMorders.db[url]&[/url]eqX-AUTOIDdata=3D[url]&[/url]append=3D= T%5D[LISTWORDS words=3D[INCLUDE = file=3D^XML/XML-Fields-C.inc]&delimiters=3D,]X-[WORD][ShowIf [INCLUDE = file=3D^XML/duplicate-field-names.inc]^|[WORD]|]-CUSTOMER[/ShowIf]=3D[url][WORD][/URL]"/>[url]&[/URL][/LISTWORDS][!] [/!][LISTWORDS words=3D[INCLUDE = file=3D^XML/XML-Fields-O.inc]&delimiters=3D,]X-[WORD][ShowIf [INCLUDE = file=3D^XML/duplicate-field-names.inc]^|[WORD]|]-ORDER[/ShowIf]=3D[url][url][WORD][/URL][/URL][/Then][Else][url][= WORD][/URL][/Else][/If]"/>[url]&[/URL][/LISTWORDS]X-ThisOrder=3D[TEXT = SHOW=3DT]X-ThisOrder=3D-[url]&[/URL]X-STOREID-LINEITEM=3D[url]&[/URL]X-ORDERID=3D[url]&[/URL]X-AUTOID=3DCUSTOMER[/TEXT][!] [/!][!]CLOSES O[/!]%5B/REPLACE%5D %5BREPLACE = db=3D^data/HOSOMorders.db[url]&[/url]eqX-AUTOIDdata=3D[url]&[/url]append=3D= T%5DX-ThisOrder=3D-[url]&[/URL][LISTWORDS words=3D[INCLUDE = file=3D^XML/XML-Fields-OE.inc]&delimiters=3D,]X-[WORD][ShowIf [INCLUDE = file=3D^XML/duplicate-field-names.inc]^|[WORD]|]-LINEITEM[/ShowIf]=3D[url][WORD][/URL]"/>[url]&[/URL][/LISTWORDS]%5B/REPLACE%5D [!]CLOSES O[/!] On 28/05/2012, at 12:22 PM, David Bastedo wrote: > Hmm. i am stuck again it seems, I can get the data via xlst, but = writing it to a db seems really awkward, i think I need to look at = another solution. So how do you use middle to get the value to actually = show up? >=20 > d. >=20 >=20 >=20 > On Sun, May 27, 2012 at 7:23 PM, Stuart Tremain = wrote: > I use MIDDLE to get past the [CDATA >=20 >=20 > On 27/05/2012, at 1:35 AM, David Bastedo wrote: >=20 >> Hi, has anybody run into the following xml parsing issue? >>=20 >> The node: >> =20 >> I can see the content I want in an xml file. in the CDATA abvoe - = being the content of a tweet "RT @BoyTopi: I want to feel snow! Not the = fake ones at Snow City." >>=20 >> the value of the "text" node returns a blank.=20 >>=20 >> if I get a node attribute of "text" then I get a return name value of = "#cdata-section" and no "value" >>=20 >> How do I get to the CDATA information in the following example. >>=20 >> Any ideas? Is there something I am missing? >>=20 >> thanks. >>=20 >> d. >>=20 >> sample: xml >> >> >> tweets_locarea >> 206405518925905920 >> 1338045885 >> >> >> 803 >> >> Hesperia_WX >> 25 >> unknown >> = >> >> >> US >> United States Of America >> 1 >> USCA0481 >> CA >> Hesperia >> >> >> >>=20 >> sample parse >>=20 >> --tweet:=20 >> ---klass: tweets_locarea >> ---tweetId: 206405503587328000 >> ---date: 1338045881 >> ---text:=20 >> ----#cdata-section: ------------------> the offending line >> ---sentiment:=20 >> ---dma: 803 >> ---tweeter:=20 >> ----screenName: HeyAbbie_ >> ----influence: 27 >> ----gender: female >> ----profileImageURL:=20 >> -----#cdata-section: ------------------> the offending line >> ---location:=20 >> ----countryCode: US >> ----country: United States Of America >> ----type: 1 >> ----id: USCA0638 >> ----state: CA >> ----name: Los Angeles >>=20 >> =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 >=20 >=20 > --=20 > David Bastedo > Ten Plus One Communications Inc. > http://www.10plus1.com > 416.277.4499 > My Profiles =20 > Find me on davidbmbastedo@gmail.com > My Latest Shared Link is: QR code stickers turn real-world objects = into digital conversations | Springwise >=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 --Apple-Mail=_7F5E84A9-4DEA-4C43-8506-5E6616028E77 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=iso-8859-1
[!] --------------  WRITE RESULT TO FILE -------------- = [/!]
[WRITEFILE = file=3Dinclude/hosom/RESULTDATA/NEWDATA-[DATE %Y%m%d]-[TIME = %H%M].xml][RESULTDATA][/WRITEFILE]


[!] --------------  Get Ready to append XML = data to a database. -------------- [/!]
[xsl var=3Dxsl_ORDER1][INCLUDE = file=3D^XML/XML-order-stylesheet.inc][/XSL]
[text]RESULT=3D[unurl][xslt = xslref=3Dxsl_ORDER1][RESULTDATA][/xslt][/unurl][/text]


[!] --------------  Interpret = [RESULT] to 'parse' WebDNA code and do the APPEND.  -------------- = [/!]
[interpret][RESULT][/interpret]


Here is the style sheet, the trick = is to write your WebDNA with URL'd brackets ie  %5B/REPLACE%5D = instead of [/REPLACE] and check the way that & is URL'd. The = reason that this is done is that if you use [ or ] it will interpret the = WebDNA before you really want to use it, hence = the [interpret][RESULT][/interpret]

Sorry, you will have to read around the LISTWORDS stuff.


<xsl:stylesheet version=3D"1.0" = xmlns:xsl=3D"http://www.w3.org/1999/XSL/T= ransform">
<xsl:template match=3D"/">
<xsl:for-each select=3D"HOSOMC/C">

%5BREPLACE = db=3D^data/HOSOMorders.db[url]&[/url]eqX-AUTOIDdata=3D[url]&[/url]= append=3DT%5D[LISTWORDS words=3D[INCLUDE = file=3D^XML/XML-Fields-C.inc]&delimiters=3D,]X-[WORD][ShowIf = [INCLUDE = file=3D^XML/duplicate-field-names.inc]^|[WORD]|]-CUSTOMER[/ShowIf]=3D<xsl:value-of = select=3D"[url][WORD][/URL]"/>[url]&[/URL][/LISTWORDS][!]
[/!]<xsl:for-each = select=3D"O">[LISTWORDS words=3D[INCLUDE = file=3D^XML/XML-Fields-O.inc]&delimiters=3D,]X-[WORD][ShowIf = [INCLUDE = file=3D^XML/duplicate-field-names.inc]^|[WORD]|]-ORDER[/ShowIf]=3D<xsl:value-of select=3D"[If = ("[WORD]"^"COMMENT")][Then][url][url][WORD][/URL][/URL][/Then][Else][url][= WORD][/URL][/Else][/If]"/>[url]&[/URL][/LISTWORDS]X-ThisOrde= r=3D[TEXT SHOW=3DT]X-ThisOrder=3D<xsl:value-of select=3D"StoreID"/>-<xsl:value-of = select=3D"ID"/>[url]&[/URL]X-STOREID-LINEITEM=3D<xsl:value-of = select=3D"StoreID"/>[url]&[/URL]X-ORDERID=3D<xsl:value-of = select=3D"ID"/>[url]&[/URL]X-AUTOID=3DCUSTOMER[/TEXT][!]
[/!]</xsl:for-each>[!]CLOSES = O[/!]%5B/REPLACE%5D

<xsl:for-each select=3D"O"><xsl:for-each= select=3D"OE">%5BREPLACE = db=3D^data/HOSOMorders.db[url]&[/url]eqX-AUTOIDdata=3D[url]&[/url]= append=3DT%5DX-ThisOrder=3D<xsl:value-of select=3D"StoreID"/>-<xsl:value-of = select=3D"OrderID"/>[url]&[/URL][LISTWORDS words=3D[INCLUDE = file=3D^XML/XML-Fields-OE.inc]&delimiters=3D,]X-[WORD][ShowIf = [INCLUDE = file=3D^XML/duplicate-field-names.inc]^|[WORD]|]-LINEITEM[/ShowIf]=3D<xsl:value-of = select=3D"[url][WORD][/URL]"/>[url]&[/URL][/LISTWORDS]%5B/RE= PLACE%5D

</xsl:for-each></xsl:for-each>[!]CLOSES = O[/!]

</xsl:for-each>
</xsl:template>
</xsl:stylesheet>





On 28/05/2012, at = 12:22 PM, David Bastedo wrote:

Hmm. i am = stuck again it seems, I can get the data via xlst, but writing it to a = db seems really awkward, i think I need to look at another solution. So = how do you use middle to get the value to actually show = up?

d.
=


On Sun, May 27, 2012 at 7:23 PM, = Stuart Tremain <webdna@idfk.com.au> = wrote:
I use MIDDLE to get past the = [CDATA


On = 27/05/2012, at 1:35 AM, David Bastedo = wrote:

Hi, has anybody run into the following xml parsing = issue?

The node:   <text><![CDATA[RT @BoyTopi: I = want to feel snow! Not the fake ones at Snow = City.]]></text>
 
I can see the content I want in an = xml file. in the CDATA abvoe - being the content of a tweet "RT = @BoyTopi: I want to feel snow! Not the fake ones at Snow City."

the value of the "text" node returns a blank.

if I get a = node attribute of "text" then I get a return name value of = "#cdata-section" and no "value"

How do I get to the CDATA = information in the following example.

Any ideas? Is there something I am = missing?

thanks.

d.

sample: = xml
<tweets>  <tweet>    =<klass>tweets_locarea<=span></klass>    =<tweetid>206405518925905920</tweetid>    =<date>1338045885=</date>    =<text><!--[CD=ATA[HA: Fair and Breezy and 50 F at Southern California Logisitics =Airport, CA Winds are from the West at 20.7 gusting to 2 http://t.co/KqLrqbuk]]--></text>    =<sentiment>    =<dma>803</dma>    <tweeter>      =<screenname>Hesperia_WX</screenname>      =<influence>25<=;/influence>      =<gender>unknown&=lt;/gender>      =<profileimageurl><!--[CDATA[http://a0.twimg.com/profile_images/383407737/Official_SW=AS_logo_normal.jpg]]--></profile=imageurl>    </tweeter>    <location>      =<countrycode>US&=lt;/countrycode>      =<country>United States Of =America</country>      =<type>1</type>      =<id>USCA0481<=/id>      =<state>CA</state>      =<name>Hesperia&l=t;/name>    =</location>  =</sentiment><=/tweet>  =<tweet>

sampl= e parse

--tweet:=20
=20 ---klass: tweets_locarea
=20 =20 =20 =20 ---tweetId: 206405503587328000
=20 =20 =20 =20 ---date: 1338045881
=20 =20 =20 =20 ---text:
=20 =20 =20 =20 ----#cdata-section: ------------------> the offending line
=20 =20 =20 ---sentiment:
=20 =20 =20 =20 ---dma: 803
=20 =20 =20 =20 ---tweeter:=20
=20 =20 =20 =20 ----screenName: HeyAbbie_
=20 =20 =20 ----influence: 27
=20 =20 =20 ----gender: female
=20 =20 =20 ----profileImageURL:
=20 =20 =20 -----#cdata-section: ------------------> the offending line
=20 =20 ---location:=20
=20 =20 =20 =20 ----countryCode: US
=20 =20 =20 ----country: United States Of America
=20 =20 =20 ----type: 1
=20 =20 =20 ----id: USCA0638
=20 =20 =20 ----state: CA
=20 =20 =20 ----name: Los Angeles

 

--------------------------------------------------------- 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
--------------------------------------------------------- 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



--


=
--
David = Bastedo
Ten Plus One Communications Inc.
http://www.10plus1.com
416.277.4499
My Profiles 3D"Twitter"=3D"Google"
Find me on 3D"Google davidbmbastedo@gmail.com

--------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: archives: http://mail.webdna.us/l= ist/talk@webdna.us Bug Reporting: support@webdna.us

= --Apple-Mail=_7F5E84A9-4DEA-4C43-8506-5E6616028E77-- 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:

WebSite and *NO* Authentication Dialog Box!!? (1998) Single Link browsing (1997) [OT] Xserve (2002) Searching multiple Databases (1997) Unix line endings (2003) Help!!!! Purchases not going through! FIXED! (1997) Has this happened to you? (was:Emailer Chokes on bad address) (1997) PSC recommends what date format yr 2000??? (1997) WCS Newbie question (1997) RE: Answer: WebDelivery downloads alias, not original ? (1997) can webcat determine an image's pixel dimensions? (2000) Recursive includes (1998) WebCat2: Master Counter snippet (1997) [include] affect on filepaths for links? (1997) database freeze (1997) Off Topic: Help Wanted (1997) [ShowNext] feature in 2.0 (1997) Re:2nd WebCatalog2 Feature Request (1996) Sorting Numbers (1997) Checkboxes to add to cart... (1998)