raveesh Posted September 5, 2006 Share Posted September 5, 2006 Hi! I am kinda new to programming in xml, I would like that the browser when displays my xml file, it should preserve the whitespace. Like in the following tag:<DESCRIPTION> * Offers 3 in 1 PC Protection from viruses, hackers and spyware so you can surf the Web safely. * Prevents multi-pronged attacks by integrating anti-virus, firewall, and anti-spyware technologies. * Simplifies security with the new and improved McAfee SecurityCenter. * Shields your PC around the clock: always on, always updating, always protecting. * Warns you about sites which send spam, install adware, or attempt online scams.</DESCRIPTION>I wnat the browser to display it as it is, like the <pre> tag of HTML, how can i do that without CSS of any add-on.thanksRaveeshPS I am new and just 15 so please explain a little bit. Link to comment Share on other sites More sharing options...
boen_robot Posted September 5, 2006 Share Posted September 5, 2006 The XML source tree is not to be used in a real life application. You MUST use CSS to style it and use the white-space property for that OR you can use XSLT to map this element's content to a <pre> element or another one styled with the CSS property.You may use xml:space="preserve" but that doesn't influence output, but only input. It's useless to explain this bit. You must make tests on your own to get it. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now