GraphML

GraphML
Caractéristiques
Basé sur
Site web

GraphML est un format de fichier basé sur le XML, pour décrire des graphes.

Fonctionnalités

GraphML prend en compte :

Exemple simple

Un fichier GraphML est un fichier XML contenant un graphe (élément <graph>), auquel est rattachée une liste non-ordonnée de nœuds (éléments <node>) et d'arêtes (éléments <edge>).

Chaque élément <node> doit posséder un identifiant (attribut id) unique.

Chaque élément <edge> doit posséder une source (attribut source) et une cible (attribut target) qui reprennent les identifiants précédemment déclarés comme attribut des éléments <node>.

Cet exemple définit un graphe simple (ayant pour identifiant G), avec deux nœuds (n0 et n1) reliés par une arête (e1) non orientée (undirected):

<?xml version="1.0" encoding="UTF-8"?>
<graphml xmlns="http://graphml.graphdrawing.org/xmlns"  
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://graphml.graphdrawing.org/xmlns/1.0/graphml.xsd">
  <graph id="G" edgedefault="undirected">
    <node id="n0"/>
    <node id="n1"/>
    <edge id="e1" source="n0" target="n1"/>
  </graph>
</graphml>

Editeurs et visionneuses

Gratuits

Voir aussi

Articles connexes

  • GML un autre format très utilisé, pour décrire des graphes (non-XML).
  • DOT est un autre langage utilisé pour décrire des graphes
  • Les bibliothèques logicielles Boost pour le langage C++ permettent de lire et d'écrire des graphes au format GraphML.

Liens externes

Content Disclaimer

Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.

  1. The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
  2. There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
  3. It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
  4. Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
  5. Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.