Autor Beitrag
Chris1308
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 220

Win XP Prof.
D2005 Prof, D7 Prof, D7 Pers
BeitragVerfasst: So 10.08.03 15:41 
Ich habe mich mal drangesessen ein Tutorial zu schreiben.
Das Tutorial befasst sich mit dem Thema XML, weil dieses Thema mehr und mehr an Beliebtheit gewinnt.
Ich habe hier bereits ein Tutorial gelesen, was sich mit XML auseinander setzt. Allerdings wird da Delphi 6 vorrausgesetzt. Mein Tutorial hingegegen befasst sich mit dem MS XML DOM 4.0.

Im Laufe der Zeit werde ich immer mal wieder Sachen einbauen und Sie Anhängen.

Das im Tutorial programmierte Programm habe ich leider bisher noch nicht hochladen können, werde das aber schnellstmöglich nachholen.

Download: www.csd-software.net.../xml-tutorial_21.pdf (bis Ende November nicht erreichbar)
Projektwebsite: www.csd-software.net...ials/delphi_xml.html

Viel Spaß und Erfolg mit dem Tutorial!

Chris

Moderiert von user profile iconUGrohne: Links eingefügt :evil:
[edit=Chakotay1308]Ja, sorry. :roll: Links upgedatet.[/edit]


Zuletzt bearbeitet von Chris1308 am Do 11.11.04 00:30, insgesamt 4-mal bearbeitet
Chris1308 Threadstarter
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 220

Win XP Prof.
D2005 Prof, D7 Prof, D7 Pers
BeitragVerfasst: Do 04.09.03 22:11 
Hi,
endlich ist es soweit: eine überarbeitete Version des XML-Tutorials. Vielleicht - hoffentlich - ein wenig besser, als die alte Version.

Downloadlink: www.csd-software.net.../xml-tutorial_20.pdf
Weitere Infos und immer aktuelle Versionen: www.csd-software.net/tutorials/xml.php

In den nächsten Wochen gibt es dann auch 2.5, in der es dann auch um Attribute gehen wird.

An dieser Stelle noch mal Dank an Mathias Simmack, der mal wieder das Tutorial korrigiert hat! :thuimb:

Viel Spaß,
Chris
Chris1308 Threadstarter
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 220

Win XP Prof.
D2005 Prof, D7 Prof, D7 Pers
BeitragVerfasst: So 28.09.03 10:44 
Hi,
jetzt habe ich ganz schnell mal eine neue Version hochgeladen. Ein paar Fehler hatten sich eingeschlichen. ;)
Des Weiteren ist das Kapitel zum Löschen von Datensätzen nun drin.

Download: www.csd-software.net.../xml-tutorial_21.pdf
Projektwebsite: www.csd-software.net/tutorials/xml.php

Viel Spaß beim Lesen,
Chris
O'rallY
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 563



BeitragVerfasst: Sa 15.05.04 00:53 
Datei lässt sich nicht downloaden. Datei existiert nicht, das ist auf jedenfall die Fehlermeldung, dich ich erhalte.

_________________
.oO'rallY
Linux is like a tipi: No gates, no windows and a gnu-eating apache inside...
Chris1308 Threadstarter
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 220

Win XP Prof.
D2005 Prof, D7 Prof, D7 Pers
BeitragVerfasst: Sa 15.05.04 00:56 
Hi,
morgen sollte es wieder gehen. Bin gerade dabei die Downloadsektion zu überarbeiten. Spätestens morgen abend.

Chris

PS: Grund dafür ist, dass man derzeit keine Dateien richtig downloaden kann. Von daher kann es auch in den letzten Tagen zu Problemen gekommen sein. Sorry dafür.
matze
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 4613
Erhaltene Danke: 24

XP home, prof
Delphi 2009 Prof,
BeitragVerfasst: Sa 15.05.04 09:42 
pass doch dann auch bitte den link im obersten Post an !

_________________
In the beginning was the word.
And the word was content-type: text/plain.
Burgpflanze
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 67

Windows2000 Prof. SP4
Delphi7 Enterprise
BeitragVerfasst: Mi 20.10.04 13:05 

_________________
Gruss, Burgpflanze
shroty
Hält's aus hier
Beiträge: 10


D7 Pers
BeitragVerfasst: Mi 10.11.04 11:24 
wie ist denn da der ben-name und das pw?
sonst geht nichts!

ciao shroty
Chris1308 Threadstarter
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 220

Win XP Prof.
D2005 Prof, D7 Prof, D7 Pers
BeitragVerfasst: Mi 10.11.04 15:54 
Hi,
hm... ich hatte da was gestern vergessen. :?

Heute abend ist ein alternativ Server online.

Chris
Chris1308 Threadstarter
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 220

Win XP Prof.
D2005 Prof, D7 Prof, D7 Pers
BeitragVerfasst: Do 11.11.04 00:28 
Hi,
es gibt halt im Moment das Problem mit den Lizenzen. Grundsätzlich ist jetzt von meiner Seite nichts mehr erreichbar zum Herunterladen. Das schließt das XML-Tutorial im Moment mit ein. Ich habe im Moment auch nicht die Zeit irgendwas daran zu ändern.
Tut mir Leid, aber Ende des Monats sollte es das Tutorial wieder geben.

Chris
MathiasSimmack
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Do 11.11.04 12:25 
Na ja. Ich habe auch schon angefangen, meine Programme mit D6PE neu zu kompilieren. Zwei sind noch gesperrt (beim Downloadversuch siehst du eine Sorry-Seite), die anderen sind schon wieder neu oben.

Und warum ist das Tutorial davon betroffen? Nur wg. der paar Delphi-Zeilen drin? Die könnten auch mit einer D6-Personal entstanden sein. Und dann darfst du es weitergeben. :)
Markus123
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 35


Delphi 2007
BeitragVerfasst: Fr 18.02.05 15:52 
Hallo zusammen,

ich habe mich an das Tutorial gehalten, XML 4.0 installiert, MSXML2_TLB importiert und folgenden Code verwendet:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
  xmlDoc:= CoDOMDocument40.Create;
  xmlDoc.setProperty('NewParser', true);

  if FileExists(dateiName) then
    xmlDoc.loadXML(dateiName)
  else
  begin
    MessageDlg('Die XML-Datei konnte nicht geöffnet werden!', mtError, [mbOK], 0);
    Application.Terminate;
  end;

  if xmlDoc.parseError.errorCode <> 0 then
  begin
    MessageDlg('Die XML-Datei ist nicht korrekt!', mtError, [mbOK], 0);
    Application.Terminate;
  end;


Allerdings steigt er an der Stelle xmlDoc.parseError.errorCode aus, denn der Wert beträgt -1072894419. Im Netz habe ich keine Hilfe für das Problem finden können.

Ich verwende Delphi 4 Pro unter Windows 2000. Sowohl Delphi als auch Windows sind auf dem aktuellen Stand...

Grüße,
Markus

Moderiert von user profile iconraziel: Code- durch Delphi-Tags ersetzt.
Chris1308 Threadstarter
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 220

Win XP Prof.
D2005 Prof, D7 Prof, D7 Pers
BeitragVerfasst: Fr 18.02.05 17:27 
Hi,
wie sieht denn deine XML-Datei aus? Darin müsste der Fehler zu finden sein.

Chris
Markus123
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 35


Delphi 2007
BeitragVerfasst: Mo 21.02.05 09:25 
Hi Chris,

ich habe den Beispiel-Code verwendet:

Zitat:
<?xml version=“1.0“ encoding=“ISO-8859-1“?>
<movieorganizer>
<movie>
<id>1</id>
<name>Der Schuh des Manitu</name>
<format>DVD</format>
<ton>DD5.1</ton>
<anzmedien>2</anzmedien>
<bildqualitaet>1+</bildqualitaet>
<tonqualitaet>1</tonqualitaet>
<gesamt>1+</gesamt>
<verliehen></verliehen>
<comment>Lustige Komödie mit Bully.</comment>
<screenshot />
</movie>
</movieorganizer>


Danke,
Markus
MathiasSimmack
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Mo 21.02.05 11:06 
Markus123 hat folgendes geschrieben:
ich habe mich an das Tutorial gehalten

Nein, hast du dich nicht. :)
Zitat:
ausblenden Delphi-Quelltext
1:
2:
  if FileExists(dateiName) then
    xmlDoc.loadXML(dateiName)

"loadXML" wird nur benutzt, wenn du den XML-Code der Datei per String einfügen willst:
ausblenden Delphi-Quelltext
1:
xmlDoc.loadXML('<?xml version="1.0"?><MovieOrganizer/>');					

Für Dateien nimmst du ganz einfach nur "Load". Das steht aber auch so im Tutorial drin, weil Chris entweder die Datei lädt (Load) oder (sollte sie nicht existieren) neu erzeugt (LoadXml).

Und wenn du den Fehler im Klartext sehen willst, dann mach folgendes:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
const
  XMLDATABASEERROR = 'Error "%s" (%d) at line %d, position %d' +
    #13#10#13#10 + '"%s"';

{ ... }

xmldoc.load(fSavePath + '\' + DATABASE_FNAME);

if(xmldoc.parseError.errorCode <> 0then
  MessageBox(self.Handle,pchar(Format(XMLDATABASEERROR,
    [xmldoc.parseError.reason,xmldoc.parseError.errorCode,
     xmldoc.parseError.line,xmldoc.parseError.linepos,
     xmldoc.parseError.srcText])),
  nil,
  MB_OK or MB_ICONEXCLAMATION);


@Chris: Es wird Zeit für ein Update deiner Doku. :mrgreen:
Markus123
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 35


Delphi 2007
BeitragVerfasst: Mo 21.02.05 11:22 
Hi,

Schande über mich - wer zum Lesen zu blöd ist, sollte eigentlich auch das Programmieren lassen! :oops:

Danke für die Hilfe...

Grüße,
Markus
Chris1308 Threadstarter
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 220

Win XP Prof.
D2005 Prof, D7 Prof, D7 Pers
BeitragVerfasst: Mo 21.02.05 17:06 
Hi Mathias,
MathiasSimmack hat folgendes geschrieben:
@Chris: Es wird Zeit für ein Update deiner Doku. :mrgreen:

daran erinnerst du mich jedes Mal, wenn Probleme mit dem Tutorial aufgetreten sind. ;) Und ja: ich werde die Doku updaten (einen Entwurf habe ich dir ja mal zukommen lassen). Aber im Moment würde es mal wieder absolut nichts bringen, weil es nur zusammenhangslose Sätze wären, die sowieso niemand versteht, der nicht gerade auf Drogen ist. ;)
Deswegen lasse ich das lieber und warte damit noch ein paar Wochen, okay? ;)

Chris