Spacing in html text
What would be the best way of removing the leading and trailing whitespace of some given html without using explicit replace? Attached an example report with some HTML as an example, showing the spacing that I want to get rid of.
As you can see the purple cell holds the html, and the spacing above and below is what I want to remove, but if there is spacing within (multiple paragraphs for example) then I don't want to remove that spacing. Only the leading and trailing whitespace.
Any help greatly appreciated
Comments
-
Change your code to:
<div><VALUE-OF>row["CUSTOMERNAME"]</VALUE-OF></div>
The paragraph (p) tag is adding the extra space, so I changed it to div. The table will be placed inside the document body, so I also removed the html and body tags.
Warning No formatter is installed for the format ipb0 -
Think I may have worded it badly.
The problem with changing it manually is the report will be pulling in html data from a database, so I need to be able to remove the paragraph spacing at runtime.
0 -
The row["CUSTOMERNAME"] was just using the example database
0 -
You need to parse the values from the database. You can do that in the query, or you can create a computed column in the data set. In a computed column, you would use JavaScript String methods like slice(), substr(), and replace() to remove or modify the tags returned in row["column_name"].
Warning No formatter is installed for the format ipb0
Categories
- All Categories
- 111 Developer Announcements
- 49 Articles
- 103 General Questions
- 123 IM Services
- 40 OpenText Hackathon
- 31 Developer Tools
- 20.6K Analytics
- 4.1K AppWorks
- 8.9K Extended ECM
- 897 Cloud Fax and Notifications
- 77 Digital Asset Management
- 9.3K Documentum
- 29 eDOCS
- 123 Exstream
- 39.8K TeamSite
- 1.7K Web Experience Management
- 1 XM Fax