Einzelnen Beitrag anzeigen

Benutzerbild von himitsu
himitsu

Registriert seit: 11. Okt 2003
Ort: Elbflorenz
43.167 Beiträge
 
Delphi 12 Athens
 
#6

Re: Wann Element <> Attribut ?

  Alt 21. Nov 2009, 22:31
für geile Bilder haben wir doch immer was übrig

ansonsten gibt es tausende Lösungen
XML-Code:
<?xml version="1.0" encoding="utf-8"?>
<graph>
  <subgraph id="0" name="Graph Nr. 0">
    <node id="0" />
    <node id="1" />
    <node id="2" />
    <edge isgraph="false" source_id="0" target_id="1" />
    <edge isgraph="true" source_id="1" target_id="2">
      <subgraph_id>1</subgraph_id>
    </edge>
  </subgraph>
  <subgraph id="1" name="Graph Nr. 1">
    <node id="0" />
    <node id="1" />
    <node id="2" />
    <node id="3" />
    <edge isgraph="false" source_id="0" target_id="1" />
    <edge isgraph="false" source_id="1" target_id="3" />
    <edge isgraph="false" source_id="0" target_id="2" />
    <edge isgraph="false" source_id="2" target_id="3" />
  </subgraph>
</graph>
XML-Code:
<?xml version="1.0" encoding="utf-8"?>
<graph>
  <subgraph id="0" name="Graph Nr. 0">
    <node id="0" />
    <node id="1" />
    <node id="2" />
    <edge isgraph="false" source_id="0" target_id="1" />
    <edge isgraph="true" source_id="1" target_id="2" subgraph_id="1" />
  </subgraph>
  <subgraph id="1" name="Graph Nr. 1">
...
wenn ein subgraph immer nur einem edge zugeordnet ist oder Keinem, dann ginge es auch so
XML-Code:
<?xml version="1.0" encoding="utf-8"?>
<graph>
  <subgraph id="0" name="Graph Nr. 0">
    <node id="0" />
    <node id="1" />
    <node id="2" />
    <edge isgraph="false" source_id="0" target_id="1" />
    <edge isgraph="true" source_id="1" target_id="2">
      <subgraph id="1" name="Graph Nr. 1">
        <node id="0" />
        <node id="1" />
        <node id="2" />
        <node id="3" />
        <edge isgraph="false" source_id="0" target_id="1" />
        <edge isgraph="false" source_id="1" target_id="3" />
        <edge isgraph="false" source_id="0" target_id="2" />
        <edge isgraph="false" source_id="2" target_id="3" />
      </subgraph>
    </edge>
  </subgraph>
</graph>
Wobei man isgraph= doch garnicht benötigt?
Dieses erkennt man ja auch an subgraph_id, bzw. dem untergeordnetem subgraph.
Garbage Collector ... Delphianer erzeugen keinen Müll, also brauchen sie auch keinen Müllsucher.
my Delphi wish list : BugReports/FeatureRequests
  Mit Zitat antworten Zitat