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

  • SEARCH
  • Home
  • 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 3631482
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T00:24:10+00:00 2026-05-19T00:24:10+00:00

I have problem with parsing XML. I parsed data of cities, Amsterdam & Den

  • 0

I have problem with parsing XML.

I parsed data of cities, Amsterdam & Den Bosch.

Amsterdam works fine but Den Bosch does not.

No doubt it is due to space problem.
Den Bosch has a white space.

Should I trim the whitespace in my application or the web service?

Which would be the best to handle the space problem?

EDIT:
The OP and @PeterMurray-Rust seem to agree that the problem is that the third-party app returns URL-escaped strings of the form:

"Den%20Bosch"

%20 is not recognized by XML as anything special and that it will be necessary to replace occurrences by spaces. A typical scripting approach would be

s/%20/ /g

This is likely to be quite a common problem although I’m not clear why content should be URL-encoded.

[OP please comment if I have got this wrong]

  • 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-19T00:24:10+00:00Added an answer on May 19, 2026 at 12:24 am

    From your update I assume that the data is something like:

    <city>Den%20Bosch</city>
    

    The string “%20” is three characters which XML does not regard as having any specific meaning. Depending on your language or whether you use XSLT you will need to replace them. In Java and the XOM library I might write

    String value = cityNode.getValue().replaceAll("%20", " ");
    

    I can’t help with the specifics of Cocoa – I think you’ll have to investigate the API to find how to get content values.

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

Sidebar

Related Questions

I got a problem regarding parsing XML data. I have divided my program into
I have a problem when parsing dynamic xml data into a html table. The
I have a problem parsing a XML file which contains special characters like ,
I have got an application, that is getting data via XML-files. During the parsing-part
I have problem in parsing XML containing gsm packets through my .Net application.I want
I have a strange behavior when parsing a large xml (but I'm not sure
I need to insert data from my parsed XML file to mySQL table. Problem
I have a problem when parsing xml from the internet. The parser doesn't return
Hi BB developers I have a issue while parsing the xml data using DOM.
I have one problem with parsing *.docx document with OpenXML (C#). So, here's my

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.