Autor Beitrag
BenBE
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 8721
Erhaltene Danke: 191

Win95, Win98SE, Win2K, WinXP
D1S, D3S, D4S, D5E, D6E, D7E, D9PE, D10E, D12P, DXEP, L0.9\FPC2.0
BeitragVerfasst: Do 13.05.10 16:21 
Die Frage hat zwar jetzt nichts direkt mit Delphi zu tun, aber mit dem Umfeld.

Und zwar hab ich hier grad einen 1MB großen XML-Dump, aus dem ich gezielt eine Reihe von Knoten entfernt haben möchte (konkret alle Revision-Knoten, deren Timestamp mit 2010-05- anfängt. Es handelt sich dabei um einen MediaWiki-Dump, den ich etwas bereinigen müsste ;-)

Hat da von euch jemand einen Tipp, wie man das möglichst einfach machen könnte?

_________________
Anyone who is capable of being elected president should on no account be allowed to do the job.
Ich code EdgeMonkey - In dubio pro Setting.
alzaimar
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2889
Erhaltene Danke: 13

W2000, XP
D6E, BDS2006A, DevExpress
BeitragVerfasst: Do 13.05.10 16:41 
Wenn Du 'einfach' mit 'schnell vom Tisch' gleichsetzen könntest, sollte es ein hingerotzter -sagen wir- 30 Zeiler doch auch tun. Zeitaufwand: 30min?

_________________
Na denn, dann. Bis dann, denn.
BenBE Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 8721
Erhaltene Danke: 191

Win95, Win98SE, Win2K, WinXP
D1S, D3S, D4S, D5E, D6E, D7E, D9PE, D10E, D12P, DXEP, L0.9\FPC2.0
BeitragVerfasst: Do 13.05.10 17:17 
Also gerotzt bekomm ich das auch mit nem Regexp-Einzeiler. Mir ging es eher drum, wie man sowas "sauber" machen kann unter Einhaltung der XML-Struktur. Weil XPath müsste sich dazu ja anbieten. Nur XPontus, der wohl XPath können soll, hat nicht mal auf einfachste Anfragen //revision/timestamp irgendwas geantwortet; geschweige denn, dass man in der Baumstruktur hätte direkt Knoten löschen können.

_________________
Anyone who is capable of being elected president should on no account be allowed to do the job.
Ich code EdgeMonkey - In dubio pro Setting.
Martok
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 3661
Erhaltene Danke: 604

Win 8.1, Win 10 x64
Pascal: Lazarus Snapshot, Delphi 7,2007; PHP, JS: WebStorm
BeitragVerfasst: Do 13.05.10 21:56 
Do want.

Kann dir leider auch keinen Tipp geben, hab aber auch öfter mal das Problem. Und was "hinhacken" in Firefox-Javascript ist auch irgendwie uncool.

_________________
"The phoenix's price isn't inevitable. It's not part of some deep balance built into the universe. It's just the parts of the game where you haven't figured out yet how to cheat."
danielf
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 1012
Erhaltene Danke: 24

Windows XP
C#, Visual Studio
BeitragVerfasst: Fr 14.05.10 08:12 
Hallo,

für Xml Transformationen bietet sich meist Xslt an. Kann dir nun aber aus dem Stegreif auch keine Syntax nennen, aber es sollte auf jeden Fall gehen. Ich denke das es ein Versuch wert ist.

Gruß
BenBE Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 8721
Erhaltene Danke: 191

Win95, Win98SE, Win2K, WinXP
D1S, D3S, D4S, D5E, D6E, D7E, D9PE, D10E, D12P, DXEP, L0.9\FPC2.0
BeitragVerfasst: Fr 14.05.10 11:16 
Direkt ne Transformation will ich in dem Sinne nicht machen. Es geht eher darum, dass ich eine XML-File habe, die ich einfach in dem Editor laden will und dann nur sage (Skripting wäre nice, muss aber nicht) Markiere alle Knoten, die auf z.B. //revision/timestamp[conent~"2010-05" passen, er mir die markiert und ich dann sagen kann, mach was mit denen. (in meinem Fall: Löschen der zugehörigen Revision-Knoten. (Das hat grob auch der verlinkte Regexp-Einzeiler gemacht, ist aber jedes Mal unhandlich.

Und das ist auch, was Martok meinte (und haben will): Ein Editor, wo man XML reingibt und wo man etwas komfortabler wie in der JS-Konsole von Firebug auf XML rumhacken kann.

_________________
Anyone who is capable of being elected president should on no account be allowed to do the job.
Ich code EdgeMonkey - In dubio pro Setting.