How to use "<" character inside attribute?

S

Serguei

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.
 
M

Martin Honnen

Serguei said:
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;"
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top