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:

Showif, Hideif reverse logic ? (1997) WebCatalog for Linux users!! (2000) WebCatalog 4 Install Problems - Not Answered ?? (2000) [WebDNA] Uploading Specific File Types (2009) Loss in form (1998) Running _every_ page through WebCat-error.html (1997) OSX 10.2.6/iTools 7.0/WebDNA 5.0 installation (2003) Problem with CC problem ? (1997) [Sum] function? (1997) ReturnRaw and redirect one last question (1997) Show shoppingcart after remove last item (1997) Summary search -- speed (1997) Orderfile Info is Dissappearing (1998) What is WebDNA (1997) Separate SSL Server (1997) Windows Install issue (2003) Help with nested search (1998) apostrophe in search item (1997) WebCat2 several catalogs? (1997) cr/cr/lf under WebSite ($WebCat.exe) confirmed (2000)