"Functional"

W

Willem

Ian Collins wrote:
) Malcolm McLean wrote:
)> The alternative to using xml is to declare a specific syntax, as used by
)> the Microsoft resource compiler, which pre-dates xml.
)
) Or use a simple, well known and supported format such as JSON. My
) "full" JSON parser is about 200 lines of code.

YAML is also a very good choice, a better choice if you want user-editability.


The big problem with XML is that it's a *markup* language, never meant for
and not very suited for data transport. The mind boggles as to why it
became the defacto standard.


SaSW, Willem
--
Disclaimer: I am in no way responsible for any of the statements
made in the above text. For all I know I might be
drugged or something..
No I'm not paranoid. You all think I'm paranoid, don't you !
#EOT
 
K

Kenny McCormack

Ian Collins wrote:
) Malcolm McLean wrote:
)> The alternative to using xml is to declare a specific syntax, as used by
)> the Microsoft resource compiler, which pre-dates xml.
)
) Or use a simple, well known and supported format such as JSON. My
) "full" JSON parser is about 200 lines of code.

YAML is also a very good choice, a better choice if you want user-editability.


The big problem with XML is that it's a *markup* language, never meant for
and not very suited for data transport. The mind boggles as to why it
became the defacto standard.

One assumes it is because of the mindshare already attained for things that
end in "ML".

--
Modern Christian: Someone who can take time out from
complaining about "welfare mothers popping out babies we
have to feed" to complain about welfare mothers getting
abortions that PREVENT more babies to be raised at public
expense.
 
R

Roberto Waltman

Robert said:
In many cases it would satisfy the most important requirement: you can
tick the "uses XML" checkbox. Unfortunately there is never a "uses
XML well" checkbox...

I have that check box between "Gives clear and unambiguous error
messages" and "Handles failures gracefully", above the "does not
invoke undefined behavior" box.

Doesn't everybody else have the same? ;)
IMO, XML is probably the wrong solution for many of those simple
tasks. Which often does lead people to implement an XML-like coding
for the data. Which is fine, except that people keep trying to pass
it off as actual XML (or as I somewhat cynically said earlier, to
manage to tick that currently fashionable checklist item).

"So, the essence of XML is this: the problem it solves is not hard,
and it does not solve the problem well."
(Simeon and Wadler, "The Essence of XML")

"XML is homomorphic to s-expressions where the first element is
atomic." (From memory, could not find a reference to the original.)
And s-expressions have been with us much longer than XML.
 
R

Roberto Waltman

Les said:
I was directed to ezXML at one point, and it's a nice, simple XML
parser. It only gets you to "leaf nodes" and then you have to interpret
it into a coherent whole by traversing child/sibling pointer
relationships.

Just in case you are interested in/tired of maintaining your own.

http://ezxml.sourceforge.net/

For similar reasons, (nice, simple, light-weight, small-is-beautiful,)
I used tinyxml:

http://www.grinninglizard.com/tinyxml/
 
M

Malcolm McLean

On Tue, 08 Oct 2013 10:01:09 -0400, Roberto Waltman

They do overstate the case a bit. XML is far from perfect, but it
*is* a standard that covers a lot of useful area. Sorta like C.


Nor is XML all that hard to use with one of the several available
toolkits, although none of those are trivial in size (and only a few
are well suited for C). The major problem I was referring too was
people using a half baked implementation instead of one of the
toolkits, and creating something that looks like XML, but really
isn't. Many of those applications could have used a much simpler
non-XML format than the XML-like non-XML implementation they did use.
It's a legitimate criticism.

But since xml is a standard, people know how to write xml tags. They can
look at the file and tell you want it probably means.
However the full standard is a bit too big to support easily. It was designed
for marking up long publishing documents, not for little config files or
lists of things to process. So you need to pull in a big third party
toolkit.
I will probably extend the vanilla xml parser to make it more compliant,
but I checked the spec, and it's hard to support the whole thing.
 
I

Ian Collins

Malcolm said:
It's a legitimate criticism.

But since xml is a standard, people know how to write xml tags. They can
look at the file and tell you want it probably means.
However the full standard is a bit too big to support easily. It was designed
for marking up long publishing documents, not for little config files or
lists of things to process. So you need to pull in a big third party
toolkit.
I will probably extend the vanilla xml parser to make it more compliant,
but I checked the spec, and it's hard to support the whole thing.

It is. My parser/DOM implementation has grown to the point where it can
parse and manipulate (Open)Office documents and that took a long time!
 
P

Phil Carmody

Seebs said:
<proprietary_data>kasflkj13912ekahdkjha</proprietary_data>

I have seen some spectacular examples of that genre.

I've seen reg-/stack-/env-dumps targz-ed up and then uuencoded into
syslog. Unfortunately those dumps weren't in XML, else I could die
a happy man, knowing that I'd seen the ultimate.

Phil
 
J

Jorgen Grahn

In many cases it would satisfy the most important requirement: you can
tick the "uses XML" checkbox. Unfortunately there is never a "uses
XML well" checkbox...

Nor a "doesn't gratuitously use XML" one ...

/Jorgen
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,012
Latest member
RoxanneDzm

Latest Threads

Top