[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Need Help: Creating XML Tag with ":"
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 would work. 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 mgushee@h... its fields; http://www.havenrock.com/ When a nation ignores the Way, Horses bear soldiers through its streets. --Lao Tzu (Peter Merel, trans.)
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|