Skipping spaces between tags?

Discussion in 'XML' started by Stefano, Aug 7, 2003.

  1. Stefano

    Stefano Guest

    Hi All,
    as per the specs, should a XML parser skip spaces between <tag> and
    </tag> (example: <data> this is the text </data> => trimmed 'this is
    the text') ?

    Thanks in advance

    Stefano
     
    Stefano, Aug 7, 2003
    #1
    1. Advertising

  2. In article <>,
    Stefano <> wrote:

    >as per the specs, should a XML parser skip spaces between <tag> and
    ></tag> (example: <data> this is the text </data> => trimmed 'this is
    >the text') ?


    No. As the spec says in 2.10:

    An XML processor must always pass all characters in a document that
    are not markup through to the application.

    An *application* can do what it likes, but a conformant XML parser
    must not remove the spaces.

    -- Richard
    --
    Spam filter: to mail me from a .com/.net site, put my surname in the headers.

    FreeBSD rules!
     
    Richard Tobin, Aug 7, 2003
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. ma701ss

    XSL - skipping tags

    ma701ss, Jan 6, 2004, in forum: XML
    Replies:
    2
    Views:
    425
    Maarten Wiltink
    Jan 6, 2004
  2. John B. Matthews
    Replies:
    4
    Views:
    681
    John B. Matthews
    Sep 12, 2008
  3. Roedy Green
    Replies:
    3
    Views:
    641
  4. Tomasz Chmielewski

    [CSS] how can I show spaces as spaces?

    Tomasz Chmielewski, Sep 5, 2009, in forum: HTML
    Replies:
    21
    Views:
    1,635
    Jan C. Faerber
    Sep 10, 2009
  5. replacing tags between tags

    , Sep 18, 2005, in forum: Perl Misc
    Replies:
    9
    Views:
    136
    J├╝rgen Exner
    Sep 19, 2005
Loading...

Share This Page