IT Community - Software Programming, Web Development and Technical Support

XML and white spaces

This is a discussion on XML and white spaces within the XML and SOAP forums, part of the Web Development category; Does XML preserves white spaces or not?...


Go Back   IT Community - Software Programming, Web Development and Technical Support > Web Development > XML and SOAP

Register FAQ Members List Calendar Mark Forums Read
  1 links from elsewhere to this Post. Click to view. #1 (permalink)  
Old 09-01-2007, 06:58 AM
Sathish Kumar Sathish Kumar is offline
D-Web Analyst
 
Join Date: Feb 2007
Posts: 304
Sathish Kumar is on a distinguished road
Exclamation XML and white spaces

Does XML preserves white spaces or not?
__________________
Sathish Kumar.R
Knowledge is meant to SHARE
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 03-14-2008, 02:13 AM
poornima poornima is offline
D-Web Sr.Programmer
 
Join Date: Dec 2007
Posts: 189
poornima is on a distinguished road
Smile Re: XML and white spaces

Hi,
White spaces can be preserved in XML using its default xml:space attribute..

XML provides a built in attribute 'xml:space' that instructs the agent to preserve all white space.

'xml:space' is one of the few attributes that XML reserves for itself. This attribute is inherited by child elements from their root element where white space is declared. When declared, it must be given as an enumerated type whose only possible values are "default" and "preserve".

<!ATTLIST poem xml:space (default|preserve) 'preserve'>

"default" -> the applications applies the white-space only for this element. "preserve" -> the applications preserves all the white space.

The rule for XML processors is that in the absence of a declaration that identifies the content model of an element, all white space is significant.
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 03-14-2008, 02:33 AM
poornima poornima is offline
D-Web Sr.Programmer
 
Join Date: Dec 2007
Posts: 189
poornima is on a distinguished road
Smile Re: XML and white spaces

Hi,
Plz this site too.. for further details..

Tip: Control white space in an XSLT style sheet
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

LinkBacks (?)
LinkBack to this Thread: http://www.discussweb.com/xml-soap/3582-xml-white-spaces.html
Posted By For Type Date
DiscussWeb IT Community - Technical Support and Technology Discussions This thread Refback 09-01-2007 08:44 PM

Similar Threads
Thread Thread Starter Forum Replies Last Post
Removing multiple spaces from string bluesky C# Programming 3 03-19-2008 05:17 AM
Trim Trailing and Leading Spaces using different databases srikumar_l Database Support 0 12-05-2007 02:17 AM
Black Box & White box testing prasath Software Testing 2 08-28-2007 06:12 AM
How can u test the white page Shanthi Software Testing 0 07-07-2007 01:53 AM
White Box Testing vadivelanvaidyanathan Software Testing 2 03-14-2007 04:27 AM


All times are GMT -7. The time now is 12:38 PM.


Copyright ©2004 - 2007, DiscussWeb. All Rights Reserved.

SEO by vBSEO 3.0.0