OT: Less-restrictive alternative to XML and XML visualizers?

Nick Sabalausky a at a.a
Thu Jan 15 14:22:01 PST 2009


"Nick Sabalausky" <a at a.a> wrote in message 
news:gk9cvv$gav$1 at digitalmars.com...
> "Christopher Wright" <dhasenan at gmail.com> wrote in message 
> news:gk99av$atd$1 at digitalmars.com...
>> Nick Sabalausky wrote:
>>> I have a need for an inexpensive (preferably freeware or open-source, 
>>> obviously), alternate to using XML and an XML viewer (such as 
>>> MindFusion's XML Viewer). The main problem with XML is that I need 
>>> something that will allow node names to contain any arbitrary text 
>>> character (or at least just the ascii symbols such as parentheses, 
>>> comma, etc). Any ideas?
>>
>> JSON strings are a lot less restrictive than XML strings. If that's your 
>> main requirement, JSON will probably serve.
>
> Just looked at the JSON example on Wikipedia, I'm impressed so far. It 
> seems to fix the main syntactical complaints I have with XML (overly 
> verbose, limitations on names). There seems to be a decent opensource 
> viewer here: http://www.codeplex.com/JsonViewer
>
> I don't suppose you know of a general-use tool that would let me provide a 
> text file and a tree (JSON, XML, or anything else) that describes a 
> particular parsing of the text file (obviously including indicies into the 
> original text file for each node, or something like that) and lets you 
> select one thing on one side and have it highlight the corresponding 
> portion on the other side?  Ie, like this:
>
> Source Frame: (Quotes indicate the selection)
> (1 + "(2 * 3)") % 4
>
> Tree Frame: (Quotes indicate the selection)
> %
> |-- +
> |   |-- 1
> |   |-- "*"
> |   |   |-- 2
> |   |   |-- 3
> |-- 4
>
> Then again, that could be a good exercise for trying out DWT.

If anyone's interested, I've hacked up that JsonViewer (C#, not D, 
unfortunatly) to do just what I've described above. Should come in handy for 
anyone developing language-related tools.
http://www.semitwist.com/download/parseproject.zip






More information about the Digitalmars-d mailing list