Re: [WebDNA] XML parsing issue with cdata

This WebDNA talk-list message is from

2012


It keeps the original formatting.
numero = 109140
interpreted = N
texte = --Apple-Mail=_51E0392A-D508-40E2-B621-231A29B161EA Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=iso-8859-1 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? >=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 --Apple-Mail=_51E0392A-D508-40E2-B621-231A29B161EA Content-Transfer-Encoding: 7bit Content-Type: text/html; charset=iso-8859-1 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</klass>    <tweetid>206405518925905920</tweetid>    <date>1338045885</date>    <text><!--[CDATA[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</gender>      <profileimageurl><!--[CDATA[http://a0.twimg.com/profile_images/383407737/Official_SWAS_logo_normal.jpg]]--></profileimageurl>    </tweeter>    <location>      <countrycode>US</countrycode>      <country>United States Of America</country>      <type>1</type>      <id>USCA0481</id>      <state>CA</state>      <name>Hesperia</name>    </location>  </sentiment></tweet>  <tweet>

sample parse

--tweet:
---klass: tweets_locarea
---tweetId: 206405503587328000
---date: 1338045881
---text:
----#cdata-section: ------------------> the offending line
---sentiment:
---dma: 803
---tweeter:
----screenName: HeyAbbie_
----influence: 27
----gender: female
----profileImageURL:
-----#cdata-section: ------------------> the offending line
---location:
----countryCode: US
----country: United States Of America
----type: 1
----id: USCA0638
----state: CA
----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

--Apple-Mail=_51E0392A-D508-40E2-B621-231A29B161EA-- 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=_51E0392A-D508-40E2-B621-231A29B161EA Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=iso-8859-1 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? >=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 --Apple-Mail=_51E0392A-D508-40E2-B621-231A29B161EA Content-Transfer-Encoding: 7bit Content-Type: text/html; charset=iso-8859-1 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</klass>    <tweetid>206405518925905920</tweetid>    <date>1338045885</date>    <text><!--[CDATA[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</gender>      <profileimageurl><!--[CDATA[http://a0.twimg.com/profile_images/383407737/Official_SWAS_logo_normal.jpg]]--></profileimageurl>    </tweeter>    <location>      <countrycode>US</countrycode>      <country>United States Of America</country>      <type>1</type>      <id>USCA0481</id>      <state>CA</state>      <name>Hesperia</name>    </location>  </sentiment></tweet>  <tweet>

sample parse

--tweet:
---klass: tweets_locarea
---tweetId: 206405503587328000
---date: 1338045881
---text:
----#cdata-section: ------------------> the offending line
---sentiment:
---dma: 803
---tweeter:
----screenName: HeyAbbie_
----influence: 27
----gender: female
----profileImageURL:
-----#cdata-section: ------------------> the offending line
---location:
----countryCode: US
----country: United States Of America
----type: 1
----id: USCA0638
----state: CA
----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

--Apple-Mail=_51E0392A-D508-40E2-B621-231A29B161EA-- 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:

Help! WebCat2 bug (1997) [Sum] function? (1997) carriage returns in data (1997) Checkboxes (1998) Paranoid about serial numbers...not (1998) Virtual hosting and webcatNT (1997) A question on sub-categories (1997) A multi-processor savvy WebCatalog? (1997) [SHOWIF AND/OR] (1997) California Tax Rates (1998) Extended [ConvertChars] (1997) Triggers (1999) WSDL Wizard (2003) [WebDNA] Digest (2008) Am on the list? (1997) Random Order Sort? (2000) [OT] Software bundle for Sale! (2001) Trouble with [Math] (1998) For those of you not on the WebCatalog Beta... (1997) range searching (1998)