Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9054599
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T13:43:44+00:00 2026-06-16T13:43:44+00:00

I receive response in the form of xml from a service,which i parse using

  • 0

I receive response in the form of xml from a service,which i parse using nsxmlparser.
In an instance i received an xml where the content is same in two tags.(duplicate item as in below xml)

Xml received:

<UserGeneratedContentItem>
    <link
      rel="details"
      uri="http://api.test.no/test.Ugc/vivo/usergeneratedcontentitem/16046" />
    <Data><![CDATA[<Type>Note</Type><Description>**6000 characters**</Description><Page>6</Page><ChapterNumber>1</ChapterNumber><ChapterTitle>Etikk og filosofi</ChapterTitle><Uri>http://api.test.no/test.Ugc/vivo/usergeneratedcontentitem/6</Uri><Data><StickyNotes><StickyNote name="icon_2" X="215.8" Y="352.7" note="**6000 characters**" dateTime="null" popupX="940" popupY="119" popupWidth="300" popupHeight="180" formatedDate ="2012-12-28-18-20-47" iconImage="1003"/></StickyNotes></Data>]]></Data>
  </UserGeneratedContentItem>
  <UserGeneratedContentItem>
    <link
      rel="details"
      uri="http://api.test.no/test.Ugc/vivo/usergeneratedcontentitem/16046" />
    <Data><![CDATA[<Type>Note</Type><Description>**6000 characters**</Description><Page>6</Page><ChapterNumber>1</ChapterNumber><ChapterTitle>Etikk og filosofi</ChapterTitle><Uri>http://api.test.no/test.Ugc/vivo/usergeneratedcontentitem/6</Uri><Data><StickyNotes><StickyNote name="icon_2" X="215.8" Y="352.7" note="**6000 characters**" dateTime="null" popupX="940" popupY="119" popupWidth="300" popupHeight="180" formatedDate ="2012-12-28-18-20-47" iconImage="1003"/></StickyNotes></Data>]]></Data>
  </UserGeneratedContentItem>

6000 characters include alphabet,arithmatic & general punctuation marks which would be encoded.

Prob:

In -(void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock
method content in CDATABlock variable is not same in both cases(two tags).in one instance it gives me all 6000 characters and in the other instance it gives me only few may be around 300 characters.The text (6000 characters) is same in both cases which i confirmed.

What could be the reason? Can someone help me may be anybody who faced such issue earlier like me.

Tnx in advance.Plz let me know if something is not clear or not understood.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T13:43:45+00:00Added an answer on June 16, 2026 at 1:43 pm

    thats what cdata is for — it shouldnt be parsed

    CDATA – (Unparsed) Character Data

    src: http://www.w3schools.com/xml/xml_cdata.asp

    PCDATA should be parsed


    you gotta save the block of NSData (may be called N times, so you have to concat that stuff) and -in your case- then parse the result as separate XML

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I wanted to remove the review section content from XML response I received from
I have a web service to which I send a xml request (application/x-www-form-urlencoded encoded)
I receive from server a response in this form {error:null,id:1,result: {admin:false, firstname:Jason, id:346,idHotel:109, idVendor:null,
To send something to all clients, you use: io.sockets.emit('response', data); To receive from clients,
I'm new to JSON. I need to receive a response (in form of a
I have this form to upload an xml file to server, I am using
when i receive a response from the server without that is not handle by
I have a form which sends form data for processing and accordingly receive the
My program use UdpClient to try to receive 27 responses from 27 hosts. The
I've asked this question on the Awesomium forms but I haven't received any response

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.