XML tag isue

General questions about using TextPad

Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard

Post Reply
Cijoy

XML tag isue

Post by Cijoy »

Is there an XML add-on for this product. I work quite a bit with XML and when I do a compare of 2 XML documents there is and issue with the XML tags. The app does not know to seperate the XML tags from the content and thereby has unclear compare results. My question is: Can the new version of Textpad recognize XML tags? And if not, does anyone have an enhancement where Textpad can handle the XML tags?

Any information is appreciated.
Thanks in advance.
C. O.
Andreas

Re: XML tag isue

Post by Andreas »

There are syntax definitions for highlighting for XML on the addons page:

http://www.textpad.com/add-ons/uzsyn.html
Bill Sharon

Re: XML tag isue

Post by Bill Sharon »

While there are many syntax files available for some of the XML spec layers (xsd, xsl(t), XTM, XHTML), there doesn't appear to be one for the basic XML 1.0 syntax! The syntax defs described in Morten Gresby's contribution is for DTD's.

Anyone got a good basic XML syn file??

Thanks.
Brian Travis

Re: XML tag isue

Post by Brian Travis »

You might also want to check out Architag XRay, which is a free validating XML editor, http://architag.com/xray.
Thomas Auinger

Re: XML tag isue

Post by Thomas Auinger »

Hi...

After evaluating the existing XML highlighters I modified the existing ones (which I found buggy) and came up with the following result, which nicely highlights strings and comments:

C=1

[Syntax]
IgnoreCase = No
InitKeyWordChars = A-Za-z
KeyWordChars = A-Za-z0-9_-
PreprocStart = ?
SyntaxStart = <
SyntaxEnd = >
CommentStart = <!--
CommentEnd = -->
StringStart = "
StringEnd = "
CharStart = '
CharEnd = '
CharEsc = \
StringsSpanLines = Yes
StringAlt =


; ///////////////////
; standard properties
; ///////////////////
[Keywords 1]
xml
version
encoding
standalone
DOCTYPE
SYSTEM
PUBLIC


Save this stuff to "xml.syn" file in your samples folder and use Configure / NewDocumentClass in the menu to setup your XML highlighting.

Cheers, Thomas
Thomas Auinger

Re: XML tag isue

Post by Thomas Auinger »

by the way...

It's not possible for the editor to highlight your own XML tags without evaluating a DTD or something. Still, you can place some frequently used tag names under the Keywords2 section, e.g.:

[Keywords 2]
name
id
type
class
number


This displays at least those keywords in a darker blue, making the XML document look nicer if you happen to use attributes or elements named "name", "id" etc.
Igbar

Re: XML tag isue

Post by Igbar »

CIJoiy

This note is about comparing 2 files .. not xml

Although I love the Textpad for all my editing functions I use ExaminDiff Pro for comparison. It is the best product I have ever found for dealing with comparisions

Textpad does have a compare function but the visible differences between it and ExaminDiff are amazing.

Textpad is, as I mentioned, my editor of choice for all other functions. I just wish that I could use it in a couple of 'closed' environments I work in <sigh>

Cheers

Igbar
Post Reply