Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
Developer
BrajeshSanodiya
Posts: 134
Registered: ‎08-03-2011
My Device: torch, Z10
Accepted Solution

Problem on getting data form XML

 

While I am getting data from XML if I use any symbol except then '&' it is working fine. But for '&' it giving this error:

 


No source available for "SyncCondvarWait_r() at 0xb0d5bc76" 

 

When I use this below tag it's working fine.

<employee name="Brajesh"  job="BB7 $ BB10 Developer"   salary="1.2" age="" experience="1.3"/>

 

when I use this below tag it's getting above error.

<employee name="Brajesh"  job="BB7 & BB10 Developer"   salary="1.2" age="" experience="1.3"/>

 

if anyone have any solution for this problem then help me..

-----------------------------------------------------------------------
"Like" if you liked the post.
"Accept as Solution" if the post solves your question.
-----------------------------------------------------------------------
BlackBerry Development Advisor (Retired)
mgoulet
Posts: 329
Registered: ‎05-07-2012
My Device: BB Alpha

Re: Problem on getting data form XML

Have you tried using: &amp; ?

 

e.g.:

 

<employee name="Brajesh"  job="BB7 &amp; BB10 Developer"   salary="1.2" age="" experience="1.3"/>

Martin

 

Developer
BrajeshSanodiya
Posts: 134
Registered: ‎08-03-2011
My Device: torch, Z10

Re: Problem on getting data form XML

Hi 

-----------------------------------------------------------------------
"Like" if you liked the post.
"Accept as Solution" if the post solves your question.
-----------------------------------------------------------------------
Developer
Developer
tw_
Posts: 42
Registered: ‎05-17-2012
My Device: Playbook, Dev Alpha A

Re: Problem on getting data form XML


BrajeshSanodiya wrote:


In XML documents the characters "<" and "&" denote the start of markup and may never appear in content outside of a CDATA section. If they do they are interpreted as markup by the XML parser. If you want to include a literal "&" in content you have to escape it. You can do this by using special markup like "&amp;", by using a numeric character reference or you could use a CDATA section.