Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

How to create a category with '&' in title using REST API.

 I am trying to create categories using REST API.
I am having issue when the category title has '&' like <title>Andaman & Nicobar Islands</title>.
If I use & in request XML, i am getting parsing error and if i use  '&amp;', i am getting Response code 400.

Any idea to fix this issue? Thanks in Advance.
 

0 votes

Comments

If you create such category via the web UI and the GET it using REST API, what is the RDF/XML representation of the title?
Also, out of curiosity, how exactly did you create a category using REST API?



One answer

Permanent link
Did you try to replace '&' with the corresponding entity? That would be &amp;

1 vote

Comments

I need to add title like <title>Andaman & Nicobar</title>. The character i need is & itself, not '&'.


Hi Srinivasarao, What Piotr is trying to say is that the ampersand character is a special character so you need to replace it with a HTML entity, which is a special encoding. You will notice that HTML entities all start with the ampersand character. See the link "http://www.w3schools.com/html/html_entities.asp" and search for ampersand.
You will need to use <title>Andaman &amp; Nicobar</title>to pass the ampersand character.
Simon

Ok, I just noticed that when I typed the ampersand entity, the forum parsed it and rendered the actual ampersand instead. This obviously made my answer confusing, sorry.
As Simon said, the entity should be & amp ; without the spaces.

Your answer

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,938

Question asked: Jun 03 '14, 11:35 a.m.

Question was seen: 6,052 times

Last updated: Jun 04 '14, 10:47 a.m.

Confirmation Cancel Confirm