Results 1 to 8 of 8
Thread: adding <br> html tag to string
- 10-13-2008, 07:54 PM #1
Member
- Join Date
- Oct 2008
- Posts
- 19
- Rep Power
- 0
- 10-13-2008, 08:04 PM #2it interprets the html code
Is this a java programming question?
Or an HTML coding question?
- 10-13-2008, 08:11 PM #3
Member
- Join Date
- Oct 2008
- Posts
- 19
- Rep Power
- 0
It's a java program, let's say aprogram.java. It contains a String variable and I'm assigning text and the html tag <br> to that string.
- 10-13-2008, 10:04 PM #4is interpreted as: <br>
Show me the java code with a println() that will output the HTML encodings vs the < & >.
I think you are feeding a string to a browser or server and it is converting the <>, not the java code.
- 10-13-2008, 10:39 PM #5
Member
- Join Date
- Oct 2008
- Posts
- 19
- Rep Power
- 0
The string is used to update the HTML. Once the HTML is updated, it shows <br> instead of <br>
I'm just trying to figure out what I need to do so that it doesn't change <br> and sees it as a true HTML tag.
- 10-14-2008, 12:41 AM #6
You'll have to describe the data flow a bit more for any help. Where does the String with the <>s go from the java program?
What other software is involved that converts it?
- 10-14-2008, 03:06 PM #7
Member
- Join Date
- Oct 2008
- Posts
- 19
- Rep Power
- 0
java dom
I use java dom and xml serializer to update the html doc. I did a system.out.println on the text of the node the string is applied to and the tag is rendered correctly there, so it must be the xml serializer that changes it. any ideas on how to prevent that from happening?
- 10-14-2008, 03:51 PM #8
Similar Threads
-
How can I include a html file in html textarea?
By surya_dks in forum New To JavaReplies: 2Last Post: 10-04-2008, 08:20 AM -
How to make Java see a string as html
By matpj in forum Java AppletsReplies: 4Last Post: 09-26-2008, 04:40 AM -
Using java.util.Scanner to search for a String in a String
By Java Tip in forum Java TipReplies: 0Last Post: 11-20-2007, 05:59 PM -
Help with insertName(String name) and deleteName(String name)
By trill in forum New To JavaReplies: 1Last Post: 08-07-2007, 08:29 AM -
I can't seem to pass the value of a string variable into a string array
By mathias in forum Java AppletsReplies: 1Last Post: 08-03-2007, 11:52 AM
Bookmarks