Redefining Tag Delimiter ('<' --> '[')??

Redefining Tag Delimiter ('<' --> '[')??

Post by Matt Malmgre » Thu, 17 May 2001 01:50:20



Newbie question..

We have content (VHDL models) that contain lots of >, <, and &
characters.  If we used substitution (i.e. '<' for '<') the models
would become pretty unreadable.

Is there anyway to tell a DOM parser to use another character (like '[')
as the beginning of any XML tag instead of '<'?

Thanks.

Matt

 
 
 

Redefining Tag Delimiter ('<' --> '[')??

Post by Richard Tob » Thu, 17 May 2001 02:28:37




Quote:>Is there anyway to tell a DOM parser to use another character (like '[')
>as the beginning of any XML tag instead of '<'?

No.

You could make life a little easier by using CDATA marked sections,
for example:

 <![CDATA[you can use <, & and > here]]>

which is equivalent to

 you can use &lt;, &amp; and &gt; here

The only thing you have to watch out for is the possibility that your data
might contain the CDATA section end marker ]]>.

-- Richard
--
Spam filter: to mail me from a .com/.net site, put my surname in the headers.

FreeBSD rules!

 
 
 

Redefining Tag Delimiter ('<' --> '[')??

Post by David Marteinso » Sun, 20 May 2001 16:42:21


Quote:> Is there anyway to tell a DOM parser to use another character (like '[')
> as the beginning of any XML tag instead of '<'?

One of the those things you could do in SGML but can't in XML.

Regards,

    -djm
--