[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Re: If XML is too hard for a programmer, perhaps he'd be b

  • To: 'Bill de hÓra' <bill@d...>, Dimitre Novatchev <dnovatchev@y...>
  • Subject: RE: Re: If XML is too hard for a programmer, perhaps he'd be better off as a crossing guard
  • From: Greg Alvord <Greg.Alvord@g...>
  • Date: Thu, 27 Mar 2003 18:16:51 -0600
  • Cc: xml-dev@l...

xml hard space
Bill de hÓra Wrote:
>And I don't understand this disdain for regular expressions over 
>XML. Regexes are a perfectly useful tool for manipulating text.

Certainly "If all you have is a hammer everything looks like a nail."
applies here. (No distain, I own more than one hammer)

Yes, XML can be serialized into a string.  That feature makes it portable. 

But to manipulate it as a string makes it impossible to take advantage of
properties the XML had to begin with.

There are two worlds. The world of the "value space" and that of the
"lexical space".  If you use a lexical space tool you run the risk of making
a new lexical representation for which there is NO value space equivalent.

In other words, could you make an error with a regEx tool and end up with
invalid XML?  Yes easily, and probably often.

If you use tools that manipulate in the "value space", then obtain the
lexical representation that risk goes away.

There is more than one way to manipulate in the "value" space, SAX is one,
DOM is a different one. Just because the both deal with the same lexical
representation does not make then the same, but is does make them
compatible.

I am writing this on a word processor.  If you could look through the manual
you will never find a reference to "nodes".  However, as I type, edit,
insert, back space, change font etc.  The software is building and
rebuilding a node representation for this message.

When I hit "Send" the Node tree will be serialized into this simple text
string. If you respond your word processor will take this serial text and
make it into nodes for you to edit.

I am writing is words, nodes have nothing to do this it... or do they?

Greg

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.