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 6556441
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T12:56:43+00:00 2026-05-25T12:56:43+00:00

I am being returned some XML from a web service. Basically, the xml looks

  • 0

I am being returned some XML from a web service. Basically, the xml looks like this:

<response>
    <data>
    More XML here but the it's escaped by XML entities
    </data>
</response>

so, as you can see, I have xml that is valid, but the stuff inside data tag is escaped with XML entities. what’s the best (most efficient) way for me to feed this into the parser?

What I am doing right now is, when I get the data from web service, I convert it into NSString….then replace the “XML escaped entities” with real ones…..then convert it back into NSData…then feed it into the parser. This doesn’t seem like a very good solution so I was wondering if there’s a better way to do it?

Thanks.

Alright, here’s the xml that I am getting:

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><s:Header><ActivityId CorrelationId="d39007b5-ee69-41c7-a61d-831b456f9ea3" xmlns="http://schemas.microsoft.com/2004/09/ServiceModel/Diagnostics">aa88d1cd-253c-48d1-abeb-62a880bea806</ActivityId></s:Header><s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><LoginResponse xmlns="http://MSS"><LoginResult>&lt;LoginInformation&gt;&#xD;
  &lt;User&gt;&#xD;
    &lt;UserID&gt;612&lt;/UserID&gt;&#xD;
    &lt;UserName&gt;Demo User&lt;/UserName&gt;&#xD;
    &lt;Email&gt;mssdev@mss-mail.com&lt;/Email&gt;&#xD;
    &lt;CompanyID&gt;17034&lt;/CompanyID&gt;&#xD;
    &lt;CompanyName&gt;PlanET Demonstration Agency&lt;/CompanyName&gt;&#xD;
  &lt;/User&gt;&#xD;
&lt;/LoginInformation&gt;</LoginResult></LoginResponse></s:Body></s:Envelope>

As you can see, everything in is escaped.

  • 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-05-25T12:56:43+00:00Added an answer on May 25, 2026 at 12:56 pm

    That’s kind of horrifying. Why don’t you just take the contents of that tag (e.g. the data with the entities) and just pass that through another NSXMLParser? The first parser will have decoded the entities, and the second parser will be presented with the decoded version of the contents of that tag.

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

Sidebar

Related Questions

I have an xml being returned by an extension method. Can some please help
I have some xml being returned in sharepoint, Im using xslt to create the
I'm trying to parse some xml using simplexml and php...it's being returned to me
A] Problem summary: I have JSON data being returned from python to javascript. I
I have this simple web service, right now it just looks to see if
I have a data result being returned from my database with multiple rows. The
I have a stream of xml being returned from a webservice which is coming
I have some Json being returned from facebook which I'm then parsing in to
I've got some Data being returned by an API that is formatted in a
I have a List being returned from a daoTemplate.query() call, using a rowMapper .

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.