How to use "<" character inside attribute?

Discussion in 'XML' started by Serguei, Jan 5, 2004.

  1. Serguei

    Serguei Guest

    Dear Experts,
    I try to use a < character as a part of an attribute value in the
    following way:
    .........
    <ConditionalStatement seqNumber="5" relationalOp="S<"/>
    .........

    If I try to use the Internet Explorer browser to show a file with this
    line, it failed with the error message:

    The XML page cannot be displayed
    Cannot view XML input using XSL style sheet. Please correct the error
    and then click the Refresh button, or try again later.

    --------------------------------------------------------------------------------

    The character '<' cannot be used in an attribute value. Line 45,
    Position 52


    <ConditionalStatement seqNumber="5" relationalOp="S<"/>
    ---------------------------------------------------^

    Is it possible to fix this problem?
    Regards,
    Serguei.
     
    Serguei, Jan 5, 2004
    #1
    1. Advertising

  2. Serguei wrote:

    > I try to use a < character as a part of an attribute value in the
    > following way:
    > ........
    > <ConditionalStatement seqNumber="5" relationalOp="S<"/>
    > ........
    >
    > If I try to use the Internet Explorer browser to show a file with this
    > line, it failed with the error message:
    >
    > The XML page cannot be displayed
    > Cannot view XML input using XSL style sheet. Please correct the error
    > and then click the Refresh button, or try again later.
    >
    > --------------------------------------------------------------------------------
    >
    > The character '<' cannot be used in an attribute value. Line 45,
    > Position 52
    >
    >
    > <ConditionalStatement seqNumber="5" relationalOp="S<"/>
    > ---------------------------------------------------^
    >
    > Is it possible to fix this problem?


    You need to use an entity reference to escape the <
    relationalOp="S&lt;"
    --

    Martin Honnen
    http://JavaScript.FAQTs.com/
     
    Martin Honnen, Jan 5, 2004
    #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. Velvet
    Replies:
    9
    Views:
    14,947
    Joerg Jooss
    Jan 19, 2006
  2. raavi
    Replies:
    2
    Views:
    924
    raavi
    Mar 2, 2006
  3. David Dorward
    Replies:
    1
    Views:
    2,164
    Isofarro
    Jun 28, 2003
  4. PerlFAQ Server
    Replies:
    0
    Views:
    405
    PerlFAQ Server
    Jan 25, 2011
  5. PerlFAQ Server
    Replies:
    0
    Views:
    489
    PerlFAQ Server
    Apr 13, 2011
Loading...

Share This Page