473,939 Members | 7,291 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 "Connectivi ty"

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 1660
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 "Connectivi ty"
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
2915
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 paths through a graph? I'm not a compsci-educated person, so coding my own would be less parsimonious. Thanks for any suggestions! D
25
3835
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.) dicts mapping nodes to neighbor-sets, but if one wants a graph that's implemented in some other way, this may not be the most convenient (or abstract) interface to emulate. It might be nice to have the kind of polymorphic freedom that one has with,...
1
4411
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 to #include "Graph.h" in the header file of the first program. The style he uses to make his declarations is a little unfamiliar to me, but here is my best guess at a "Graph.h" header file:
2
2892
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 see the graph in the graph control. If I dbl-clik the graph control, microsoft graph opens and displays the graph fine there too.
0
2361
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 into the display and I am getting the following error when I run the web page.Can anybody solve this problem. I would be very grateful. Thanks Error: System.InvalidOperationException: Showing a modal dialog box or form when the application is not...
2
4147
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 problem is tht,If graph is to large if it going out of screen thn ,i m getting jpg image on screen disply graph,m not getting the image of tht graph which going out of screen. this is my code This is my code
4
2563
by: Man4ish | last post by:
namespace ve/////////////////ve.h { struct VertexProperties { std::size_t index; boost::default_color_type color; }; } /////////////////////////////////////////////////////////////////////////////////////////////////// namespace ed///////////////////////ed.h
2
2338
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 <boost/graph/adjacency_list.hpp> #include <boost/tuple/tuple.hpp> #include <set> using namespace std;
0
3490
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"); // Create the basic radar graph $graph = new RadarGraph(700,500,"auto");
0
9963
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
11524
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
11109
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10658
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9858
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
8218
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7384
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
6076
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4906
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.