Lists Home |
Date Index |
On Tue, Oct 29, 2002 at 12:08:35PM +0530, Satish Lohar wrote:
> I am new in XML. I have created one XML file which contains some tags.
> xml tag is <enabled:int>1</enabled:int> and it is created against HTML tag <input type=checkbox name="enabled:int" value="1" CHECKED>.
> But ":" is special character. So XML Parser fails here. Can anyone let me know what should I do so that it will work.
If your definition of 'working' is that your element names can contain
colons, I'm afraid there is nothing you can do. Your options are:
1) Go ahead and use your markup with colons, but don't call it XML,
and don't expect XML parsers to be able to process it (I guess
you'll have to write your own parser); or
2) Use a different separator instead of a colon. Hyphens or periods
Personally, I would go with (2). Even if you absolutely must use colons
in the HTML, you'd just have to modify your transformation code to
translate hyphens to colons. That should be trivial to do in Perl, and
shouldn't degrade performance much.
Matt Gushee When a nation follows the Way,
Englewood, Colorado, USA Horses bear manure through
email@example.com its fields;
http://www.havenrock.com/ When a nation ignores the Way,
Horses bear soldiers through
--Lao Tzu (Peter Merel, trans.)