Dynamic XML document processing.

I

icogs

I may be a bit out of my depth here but...

.... say you have an application which processes some XML document,
perhaps creating SVG or HTML output to be displayed in the browser.
There are a number of XML parsers for js out there and I imagine it
won't be too hard to figure those out (though recommendations for good
ones welcome, naturally). But what if you then want to script changes
to that document's DOM dynamically. Is it possible in js to react to
those updates automatically in the same manner that a browser will
automatically render scripted changes in an HTML or SVG DOM?

I hope that's not too vague..
 
T

Thomas 'PointedEars' Lahn

icogs said:
... say you have an application which processes some XML document,
perhaps creating SVG or HTML output to be displayed in the browser.
There are a number of XML parsers for js out there and I imagine it
won't be too hard to figure those out (though recommendations for good
ones welcome, naturally). But what if you then want to script changes
to that document's DOM dynamically. Is it possible in js to react to
those updates automatically in the same manner that a browser will
automatically render scripted changes in an HTML or SVG DOM?
Mu.

I hope that's not too vague..

Unfortunately, it is.

<http://jibbering.com/faq/#posting>


PointedEars
 
R

RobG

I may be a bit out of my depth here but...

... say you have an application which processes some XML document,
perhaps creating SVG or HTML output to be displayed in the browser.
There are a number of XML parsers for js out there and I imagine it
won't be too hard to figure those out (though recommendations for good
ones welcome, naturally). But what if you then want to script changes
to that document's DOM dynamically. Is it possible in js to react to
those updates automatically in the same manner that a browser will
automatically render scripted changes in an HTML or SVG DOM?

Within its Document Object Model (DOM), the W3C defines a set of
fundamental interfaces called the "Core". It also specifies a number
of extended or additional interfaces grouped in modules such as HTML,
XML, Views, Events, UI Events, Mouse Events and so on.

An application that implements any of the extended interfaces should
also implement the core interfaces. However, there is no guarantee
that it will support all or any of them or be completely conforming
for those it does. It may also implement additional (probably
proprietary) interfaces.

Presumably you want to read an XML document and use it to update an
HTML document. Then, if the XML document is modified, respond to those
changes with updates to the HTML document. That is certainly possible
but there are any number of ways to go about it.

I think you first need to work out what you are trying to achieve so
that a set of functional requirements can be derived and possible
solutions proposed.

Alternatively, you can pick a parser (say a browser) and just play
with it to see whether you can do something useful with it. You may
discover that XML is not the best solution - it is primarily a
mechanism for transferring information between disparate systems. If
the environment is reasonably homogeneous and standards can be
enforced then an EDI format may be "better" if high speed and low
bandwidth are important criteria. JSON has similar properties to EDI
but is still much more verbose (but probably more compact than XML).
 

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

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,813
Latest member
lawrwtwinkle111

Latest Threads

Top