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-231A29B161EAContent-Transfer-Encoding: quoted-printableContent-Type: text/plain;charset=iso-8859-1I use MIDDLE to get past the [CDATAOn 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-231A29B161EAContent-Transfer-Encoding: 7bitContent-Type: text/html;charset=iso-8859-1I 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></text> <sentiment> <dma>803</dma> <tweeter> <screenname>Hesperia_WX</screenname> <influence>25</influence> <gender>unknown</gender> <profileimageurl></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 tothe mailing list .To unsubscribe, E-mail to: archives: http://mail.webdna.us/list/talk@webdna.usBug Reporting: support@webdna.us
--Apple-Mail=_51E0392A-D508-40E2-B621-231A29B161EA--
Associated Messages, from the most recent to the oldest:
--Apple-Mail=_51E0392A-D508-40E2-B621-231A29B161EAContent-Transfer-Encoding: quoted-printableContent-Type: text/plain;charset=iso-8859-1I use MIDDLE to get past the [CDATAOn 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-231A29B161EAContent-Transfer-Encoding: 7bitContent-Type: text/html;charset=iso-8859-1I 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></text> <sentiment> <dma>803</dma> <tweeter> <screenname>Hesperia_WX</screenname> <influence>25</influence> <gender>unknown</gender> <profileimageurl></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 tothe mailing list .To unsubscribe, E-mail to: archives: http://mail.webdna.us/list/talk@webdna.usBug 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:
Updating checkboxes made easy !!! (1998)
Help needed! (1998)
WebCat2.0 [format thousands .0f] no go (1997)
Virtual hosting and webcatNT (1997)
E-mail/Invoice (1998)
Separate SSL Server (1997)
Exclamation point (1997)
ShowIf Question (1998)
ODBC-Interface (2000)
Extended [ConvertChars] (1997)
RE: [WebDNA] Good advise on [Showif] or alternative... (2012)
quotes and truncating? (1997)
RE: [WebDNA] Basic Search (2008)
HomePage Caution (1997)
authnet good news (2003)
Progress !! WAS: Trouble with formula.db (1997)
webcatalog and webmerchant 2.1 (1998)
WC2.0 Memory Requirements (1997)
WC Database Format (1997)
WebCat2 - storing unformatted date data? (1997)