473,395 Members | 2,796 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

SAX or DOM, graph proccesing

SAX or DOM, graph processing.

It is my fist application in XML or I should say it will be.

Problem features.

A xml file wile cover a huge graph structure. In fist sections will be
defined vertex and than next edges. More or less like that. In whole
doc will be one more section, but I think that sections will cover less
than 5% of whole .xml.

I know that SAX works faster than DOM model and works quicker. So SAX
model should be more attractive then DOM as I say before a structure of
graph should be in most of cases huge.
But is something that I didn't tell before that every loaded graph
structure I need to check couple of algorithms like "Connectivity"

So my question is which of model will be more attractive for me.
I should use SAX processing and use call back functions to build my
graph model?. I know that SAX don't require to load whole doc in one
time but I think that is useless for me at the moment.

OR

I should use DOM model and load whole file at one time and after that
try to build structure? But again I know that DOM model eat a lot of
memory.
After the parser will load file, the point is to redraw whole structure
and the next question is.
I should use SAX second time or draw in parallel model?. But if graph
don't pass one of algorithms drawing is for nothing.

OR

I should use DOM model one more time because I have already in memory
whole structure?
Thanks for any replays
X_O
Sorry for any English mistakes taken.

Nov 2 '06 #1
5 1617
Se**************@gmail.com wrote:
But is something that I didn't tell before that every loaded graph
structure I need to check couple of algorithms like "Connectivity"
You should have a look at XMLgawk:

http://home.vrweb.de/~juergen.kahrs/...L/xmlgawk.html

This is a script language that processes XML data
in a SAX-like way. Node-by-node is read and you
can use AWK's associative arrays to check connectivity.
I should use DOM model and load whole file at one time and after that
try to build structure? But again I know that DOM model eat a lot of
memory.
It depends on the expected size of your graphs.
If the XML data is only some mega bytes in size,
then the DOM API may be more convenient. Especially
if you have to traverse the graph more than once.
After the parser will load file, the point is to redraw whole structure
and the next question is.
I should use SAX second time or draw in parallel model?. But if graph
don't pass one of algorithms drawing is for nothing.
Some time ago, I wrote a script that converts the
tree structure of XML data into a drawing. Maybe
this example is useful:

http://home.vrweb.de/~juergen.kahrs/...-tree-drawings
Nov 2 '06 #2
Since it sounds like you're building a custom data model, and one whose
structure is different from the XML document's simple containment tree,
you'll almost certainly want to build it from SAX.
Nov 2 '06 #3
I forgot to add my standard pointer:

http://www.w3.org/DOM/faq.html#SAXandDOM

--
Joe Kesselman / Beware the fury of a patient man. -- John Dryden
Nov 2 '06 #4
I've decided the chose one will be SAX at that time. But I'm still
open for new opinions about that thread.

I have one more question about technical side of XML it will be huge
off topic but at least I can try.
What will be more proper do describe my xml language DTD or XMLSchema.
As far I know those two are equal in usage. But what people use. I've
read in book from 2000 that DTD will soon gone and XMLSchema will be on
the TOP. Today we've 2006 and I still see DTD.

Nov 2 '06 #5
If you want to be able to use XML namespaces, now or in the future, you
can not use DTDs. Period.
Nov 2 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Lilith | last post by:
Is there a python module somewhere (been searching today, no luck) which has efficiently coded various graph-handling routines, such as finding the shortest path through a graph, or the set of all...
25
by: Magnus Lie Hetland | last post by:
Is there any interest in a (hypothetical) standard graph API (with 'graph' meaning a network, consisting of nodes and edges)? Yes, we have the standard ways of implementing graphs through (e.g.)...
1
by: entropy123 | last post by:
Hey all, In an effort to solve a sticky - for me - problem I've picked up Sedgewick's 'Algorithm's in C'. I've tried working through the first few problems but am a little stumped when he refers...
2
by: MLH | last post by:
A97 Am having difficulty displaying graph in Form View that I see fine in graph control on form opened in design view. I know I'm doing something wrong. If I open the form in design view - I...
0
by: mylog | last post by:
I have downloaded a GLEE(Graph Layout Execution Engine) and written the following code to display a windows form from a web page but i am encountering with a small problem on displaying the graph...
2
by: sriniwas | last post by:
Hi Frnd's, m using prefuse visulation,it's have one display class and this class have one saveImage(outPutStream, String jpg,double size);. now graph is converting ia jpg image properly.now my...
4
by: Man4ish | last post by:
namespace ve/////////////////ve.h { struct VertexProperties { std::size_t index; boost::default_color_type color; }; }...
2
by: Man4ish | last post by:
I have created Graph object without vertex and edge property.It is working fine. #include <boost/config.hpp> #include <iostream> #include <vector> #include <string> #include...
0
by: eureka2050 | last post by:
Hi all, I am creating a radar chart containing 2 plots using jpgraph. My code is as follows:- include ("./jpgraph/src/jpgraph.php"); include ("./jpgraph/src/jpgraph_radar.php"); //...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.