473,465 Members | 1,867 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

How to use "<" character inside attribute?

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.
Jul 20 '05 #1
1 6891


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/

Jul 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: J.D. Buehls | last post by:
I am displaying some values on a report. I am opening the .asp page with a Response.ContentType = "application/msword" and these particular values appear in a table. One column shows percentages...
7
by: Ensoul Chee | last post by:
I used #include <iostream.h> int m; cout << "Hexadecimal == 0x" << hex << m << endl; to print value of m in hexadecimal mode. But I got the compile error like this couttest.cpp:20 `hex'...
1
by: Christian Schmidbauer | last post by:
Hello! I prepare my XML document like this way: ------------------------------------------------------- PrintWriter writer; Document domDocument; Element domElement; // Root tag
4
by: karolina | last post by:
Hi I am playing around with visual studio 7.0. Why does the code below do like it does? Where do I set the character set to use in cout, properties->configuration properties->General->character...
6
by: Rate Spring | last post by:
hi, in win2000 and VC6, I operate a txt file. When I write a line data into file and add "\r\n" at the end of line, I find: fstream << "\r\n" write 3 chars : 0D 0D 0A fstream << "\n" ...
6
by: Pealy | last post by:
Hi. I'm trying to get one of the examples from ASP.NET 1.1 Insider Solutions to work in asp.net and i'm getting stuck on using the META tage to do a refresh. I have the following in my HTML...
10
by: Jon Noring | last post by:
Out of curiosity, may a CDATA section appear within an attribute value with datatype CDATA? And if so, how about other attribute value datatypes which accept the XML markup characters? To me,...
4
by: Trev | last post by:
Hi everyone, Thanks to all who have helped with various issues in the past. I've come up with a new one though: I've run some html through a javascript converter; basically it takes the html and...
3
by: Steven.Xu | last post by:
hi everybody, i am useing some classes which in System.Xml to deal with xml document. what can i do if the document include "<" or ">"? Thanks.
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.