top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

How are white-spaces handled by xml?

0 votes
406 views
How are white-spaces handled by xml?
posted Jan 2, 2018 by Sathaybama

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

Any white-space ( this includes line breaks, tab characters and normal spaces etc.) are passed by the xml parser unchanged to an application. This implies that it is not the responsibility of a parser on how to interpret a white-space, instead it is the responsibility of the application to know what to do with it. The white-spaces in xml can be broadly categorized into two types:

  1. Insignificant white-space : Those whites-paces that are found between structural elements and are passed by the parser as they are to the application without any effect ( suppressed) are the insignificant spaces. A good example of such white-spaces are the spaces given in an html document.
  2. Significant white-space : Those spaces that occur between the elements and can contain text and markup mixed together and are passed by the parse exactly the way they are to the application for their handling are known as the significant white-spaces.
answer Jan 2, 2018 by Shivaranjini
...