question

Upvotes
Accepted
1 0 3 2

News story response contains new line "\n" and white space irregularly. How can I customise it to display the news story in proper formate on the web page?

News story response contains new line "\n" and white space irregularly. How can I customise it to display the news story in proper formate on the web page?


For example: 3 new line character with few white space

newsrkd-apirkd
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

@dhruvpatel25811

Thank you for your participation in the forum.


Are any of the replies below satisfactory in resolving your query?

If yes please click the 'Accept' text next to the reply that best answers your question.


This will guide all community members who have a similar question. Otherwise please post again offering further insight into your question.


Thanks,

-AHS


Please be informed that a reply has been verified as correct in answering the question, and has been marked as such.

Thanks,

AHS

1 Answer

· Write an Answer
Upvotes
Accepted
78.8k 250 52 74

@dhruvpatel25811

I can't find any options in the RetrieveStoryML_1 which can customize the new line and white space. Howevever, you can use the regular expression or replace method to convert "\n" to "<br>" in order to display it on the web page, as mentioned in this thread.

Otherwise, you can use SOAP format. From my checking, the XML returned by SOAP doesn't have a "\n" character.


1603077499682.png (59.3 KiB)
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.