Français
Forum

XML Bearbeitung

 

Christian
Hahn
allô à alle,

hat quelqu'un une concept comment on XML/XHTML Dokumente dans un Verzeichnisbaum (DOM) einlesen, Travailler et wieder Sauver peux? Ideal pour währe de "Pascal" TvConti1. Am besten ist wahrscheinlich une Umsetzung dans Assembler, à cause de Geschwindigkeit, ou bien gibt es déjà Module (DLL?).
cela XML Format findet oui toujours plus Verbreitung et on sollte avec cela aussi dans XProfan quelque chose anfangen peut, zumal es oui freie XSLT-Prozessoren zum transformer dans autre Datenformate (z.B. [...]  ) gibt, avec cela peux on aussi qui Wohlgeformtheit vérifier.

mon Vorstellung:
XML Dossier dans arbre magasin -> Elemente insérer, effacer ou bien Travailler -> comme XML Sauver et/ou bien sur XSLT-Prozessor comme z.B json exportieren

sur jeden le cas habe je keinen plan!

Einen guten Glissement et viel Erfolg im l'an 2010 wünscht
Christian le coq
 
Windows XP und Profan10 | Homepage... | Folge mir...
29.12.2009  
 



Irgendwo J'ai eu la fois une einfachen XML-Parser posté, ici konnte on entre Objekten, Nodes, ... unterscheiden et simple eigene Methoden insérer - finds pas... était glaube pour [...]  entstanden.

égal, "heute serait ego eh anders machen" - so une xml.inc pour XProfan existiert malheureusement (encore) pas mais wäre au plus tard avec [...]  un Parser hierfür programmierbar qui aussi blitzschnell son pourrait.

si intérêt, ensuite peux je so une kleinen XML-Parser später aussi nochmal vormachen. Um den arbre innerprogrammlich trop "merken" (pas représentation!) et pour simple Handhabung beim insérer/Effacer/Travailler de Nodes, serait je mais une simple ListBox prendre en Einträge z.B. am Ende une Einrückungszähler besitzen. Somit liesse sich aussi blitzschnell chercher.

cela écrivons ensuite de XML est un eigener Spass, braucht on mais aussi aucun Libs ou bien DLL pour - simple XML-Zeugs dans XProfan serait je sur <300 Zeilen schätzen alors kleine Fleißarbeit.

cela Aufwändigste wäre imho un plus beau Editor!

Vlt. hat Roland mais aussi pour XProfan12 quelque chose zum Thema XML im Petto, qui sais.
 
29.12.2009  
 




Christian
Hahn
So un Parser wäre déjà pas mal.
Es besteht aussi encore qui Possibilité sur un AktiveX-objet (msxml.dll) sur "Pascals" OcxPackage. seulement blicke je chez qui DLL encore viel moins par.
 
Windows XP und Profan10 | Homepage... | Folge mir...
29.12.2009  
 



Z.B.:

+ Dossier dans String magasin
+ Cordes im String dans Platzhalter tauschen z.B. x01ID et avec cela rausfiltern (q jusqu'à q chercher jusqu'à ne...aucune q plus enthalten)
+ Alle Tabs et Doppelten Freizeichen bzw. unnütze marque avec Translate$ lünchen solange jusqu'à aucun plus là
+ Explode(upper(s),"<")

... et tu as Schonmal cela Schlimmste sur native Schleifen abgearbeitet - alors droite fix.

cela zurückgegebene Array peux eh bien simple runtergerasselt volonté de einer Funktion, qui seulement encore einzelne Anweisungen/Cordes verarbeiten muss et pas plus cela Problem hat, seulement encore qui XML trop parsen.
 
29.12.2009  
 




Uwe
''Pascal''
Niemeier
Hi gens!

si je zweimal dans einem Fil erwähnt werde, doit je mich oui annoncer

réellement peux on per ActiveX anscheinend très simple sur XML zugreifen:
KompilierenMarqueSéparation
window 700,500--Infos gefunden bei MSDN unter "XML DOM Objects/Interfaces "
 $H Windows.ph
 $H ocx3a.ph
 $I ocx3a.inc
 $I ocxInfo.inc--Zu Analysezwecken
ocxInit()
declare NodeList&
var Xml&=ocxCreate("Msxml2.DOMDocument")--oder Msxml2.FreeThreadedDOMDocument ?
ocxBrowse(Xml&)
var File$="X:Books.xml"--Demo-Datei; gibts bei MSDN; enthält anscheinend Infos über Bücher
ocxMethod(Xml&,"load",File$)
print File$
print "Name  :",ocxGet(Xml&,"NodeName")
print "Type  :",ocxGet(Xml&,"NodeTypeString")
print "Value :",ocxGet(Xml&,"NodeValue")
NodeList&=ocxGet(Xml&,"childNodes")---------Sammlung von ChildNodes
ocxBrowse(NodeList&)
print "Childs:",ocxGet(NodeList&,"length")--Anzahl Nodes in NodeList
ocxRelease(NodeList&)
print
print "Child1"
var Child1&=ocxGet(Xml&,"firstChild")
ocxBrowse(Child1&)
print "Name  :",ocxGet(Child1&,"NodeName")
print "Type  :",ocxGet(Child1&,"NodeTypeString")
print "Value :",ocxGet(Child1&,"NodeValue")
NodeList&=ocxGet(Child1&,"childNodes")
print "Childs:",ocxGet(NodeList&,"length")
ocxRelease(NodeList&)
print
print "Child2"
var Child2&=ocxGet(Child1&,"nextSibling")
ocxBrowse(Child2&)
print "Name  :",ocxGet(Child2&,"NodeName")
print "Type  :",ocxGet(Child2&,"NodeTypeString")
print "Value :",ocxGet(Child2&,"nodeValue")
NodeList&=ocxGet(Child2&,"childNodes")
print "Childs:",ocxGet(NodeList&,"length")
ocxRelease(NodeList&)
ocxDeInit()--Alle ausstehenden Freigaben erfolgen hier
waitkey

cela Problem ist: j'ai quelque chose comme de je n'en sais rien de XML...
si je cela richtig vois, wird là so ne Art de Verzeichnis-Struktur gespeichert?
avec Parents et Children?

la fois entier allgemein trop ocx: avec cela läßt sich pratique alles umsetzen,
quoi aussi avec irgendeiner Scriptsprache possible ist.
Wenns alors Beispiele pour VBS ou bien JS gibt...

HTH
Pascal
 
30.12.2009  
 




Jörg
Sellmeyer
la hâte Du qui ocxinfo.inc aussi déjà irgendwo hochgeladen?

Ok - trouvé: [...] 

Hm - chez mir krachts beim ersten ocxGet(Child1&,"NodeName")
 
Windows XP SP2 XProfan X4
... und hier mal was ganz anderes als Profan ...
30.12.2009  
 




Uwe
''Pascal''
Niemeier
Hi Jörg!

Laß dir qui ermittelten ObjektHandles ausgeben; voilà wahrscheinlich ne zéro entre.
Im Zweifelsfall müßtest du la fois une betroffene XML bereitstellen.

Habe inzwischen quelque chose rumgebastelt:
KompilierenMarqueSéparation
window 700,500
 $H Windows.ph
 $H ocx3a.ph
 $I ocx3a.inc
 $I ocxInfo.inc---Zu Analysezwecken (ocxName)

proc Auflisten---------------------------------------------Auflisten

    parameters ParentNode&,TvRoot&
    declare Node&
    var Name$=ocxGet(ParentNode&,"NodeName")
    var Wert$=ocxGet(ParentNode&,"NodeValue")
    var Type$=ocxName(ParentNode&)--aus ocxInfo.inc
    var Text$="Name:"+Name$+" / Type:"+Type$+" / Wert:"+Wert$
    TvRoot&=TreeView("InsertItem",Tv&,TvRoot&,0,Text$)
    settext %hwnd,"Einträge: "+str$(getcount(Tv&))
    var NodeMap&=ocxGet(ParentNode&,"attributes")

    if NodeMap&-------wird *nicht* leer erzeugt außer bei <author/> in Wiedergabelisten!

        whileloop 0,ocxGet(NodeMap&,"length")-1

            Node&=ocxGet(NodeMap&,"Item",&loop)
            Name$=ocxGet(Node&,"NodeName")
            Wert$=ocxGet(Node&,"NodeValue")
            Type$=ocxName(Node&)--aus ocxInfo.inc
            Text$="Name:"+Name$+" / Type:"+Type$+" / Wert:"+Wert$
            TreeView("InsertItem",Tv&,TvRoot&,0,Text$)
            ocxRelease(Node&)

        endwhile

        TreeView("SetChildren",Tv&,TvRoot&,1)
        ocxRelease(NodeMap&)

    endif

    var NodeList&=ocxGet(ParentNode&,"childNodes")
    var Count%=ocxGet(NodeList&,"length")

    if Count%---------NodeList wird auch *leer* erzeugt!

        TreeView("SetChildren",Tv&,TvRoot&,1)

        whileloop 0,Count%-1

            Node&=ocxMethod(NodeList&,"Item",&loop)
            Auflisten(Node&,TvRoot&)--rekursiver Aufruf *dieser* PROC
            ocxRelease(Node&)

        endwhile

    endif

    ocxRelease(NodeList&)
    endproc-------------------------------------------------------------
    var File$="X:Books.xml"-----------------Demo-Datei von MSDN
    var File$="X:Delain - April Rain.wpl"--WMP-Wiedergabeliste + Schleichwerbung ;-)
    var File$="X:Manifest.xml"-------------externes Manifest
    var File$="RES://X:PROFAN.EXE/24/1"----internes(!) Manifest
    var Tv&=create("TreeView",%hwnd,0,10,10,600,400)
    sendmessage(Tv&,$111B,20,0)-- Höhe 20 px sieht besser aus
    ocxInit()
    var Xml&=ocxCreate("Msxml2.DOMDocument")
    ocxMethod(Xml&,"load",File$)
    Auflisten(Xml&,0)
    ocxRelease(Xml&)
    ocxDeInit()
    ref='./../../funktionsreferenzen/XProfan/waitkey/'>waitkey

Scheint doch droite intéressant trop son, si on voit, quoi alles dans diesem Format gespeichert wird

HTH
Pascal
 
30.12.2009  
 




Jörg
Sellmeyer
je hab qui Books.xml d'ici [...]  verwendet. avec Deinem neuen Code bekomme je oui c'est ca une Eintrag


9 kB
Hochgeladen:30.12.2009
Downloadcounter190
Download
 
Windows XP SP2 XProfan X4
... und hier mal was ganz anderes als Profan ...
30.12.2009  
 




Uwe
''Pascal''
Niemeier
Hi Jörg!

ici encore un Minimal-Beispiel:
KompilierenMarqueSéparation
window 700,200
 $H Windows.ph
 $H ocx3a.ph
 $I ocx3a.inc
 $I ocxInfo.inc
ocxInit()
var File$="X:Books.xml"
var Document&=ocxCreate("Msxml2.DOMDocument")
print "Document   :",ocxName(Document&),Document&
print "Load       :",ocxMethod(Document&,"load",File$)----- OK = -1
print "HasChildren:",ocxMethod(Document&,"hasChildNodes")-- OK = -1
print
var NodeList&=ocxGet(Document&,"childNodes")
print "NodeList   :",ocxName(NodeList&),NodeList&
print "Children   :",ocxGet(NodeList&,"length")
print
var Child1&=ocxGet(NodeList&,"Item",0)
print "Child1     :",ocxName(Child1&),Child1&
print
var Child2&=ocxGet(NodeList&,"Item",1)
print "Child2     :",ocxName(Child2&),Child2&
ocxDeInit()
waitkey


SeeYou
Pascal
 
30.12.2009  
 




Jörg
Sellmeyer
c'est cela Ergebnis:



ici ist une manifest.xml, qui chez mir funktioniert:



<?xml version="1.0" encoding="utf-8" ?>

<Package>

<Files Time="2001-07-20T23:29" Version="6.10.0016.1624" UIVer="1" PVersion="1616.24">

<Group Name="Critical" Url="..%2F..">

<File Name="Setupmsn9xmig.dll" Hash="006066179165170056004117042027217067195106042074181195074251" Size="3113" />

<File Name="Setupmigrate.dll" Hash="120148054021128063087048224016070163125174141252154003252201" Size="6016" />

<File Name="Setupmsnunin.exe" Hash="147181051126107112026028028084075160235154203200136161005023" Size="10240" />

<File Name="Setupmsnupgrd.inf" Hash="125086141049240177093045079083031044130029053183152029117245" Size="1047" />

<File Name="update.exe" Hash="126176124138080243188000135117163158226243039019180233159055" Size="30385" />

<File Name="msn6.exe" Hash="006149214051173132208153170250222117015068119056143216146188" Size="35941" />

<File Name="msnmetal.dll" Hash="139222237220200125099180190237204090177042208036217100012005" Size="453887" />

<File Name="msnmetal.we" Hash="023243225112125023248001254127119245124186015087165002176133" Size="150" />

<File Name="msnmetal.jcf" Hash="015082022006163004024136080243235247076003053095217200074128" Size="335" />

<File Name="msnmtllc.dll" Hash="103213015196175139233189196084105224143197025191111198183128" Size="17437" />

<File Name="msdbx.dll" Hash="118134049132248230089107171240054011219203181122100015218171" Size="26934" />

<File Name="msmom.dll" Hash="060102191237075219042245223186161015180130062254109078088100" Size="157792" />

<File Name="mail.mar" Hash="240014088069073059201007196194061011152057227206204109232016" Size="364421" />

<File Name="msnspell.dll" Hash="203223218164002229225023241251048233169021174054217028190124" Size="40259" />

<File Name="ui.mar" Hash="117215007222123179218106170148139080251180197208206017209118" Size="753415" />

<File Name="themedef.mar" Hash="105202095191069095207180200130060011062116142182209018157136" Size="1685601" />

<File Name="online.wav" Hash="104075253182074126235179186237223025242101123104127176099234" Size="5451" />

<File Name="newalert.wav" Hash="083176106012043122243127129126094248126132072119131170165188" Size="5993" />

<File Name="newemail.wav" Hash="005174229057034062223137093022068055019033213065145087120025" Size="12673" />

<File Name="highcont.mar" Hash="183070080040218235143191194023106061103073214238009061033043" Size="14799" />

<File Name="logonmgr.dll" Hash="135103147080221162183118122093044129001050062038033076163233" Size="90407" />

<File Name="custdial.dll" Hash="068197186065205130048225193223009014097071087039064217251197" Size="5509" />

<File Name="popc.dll" Hash="228027200152051028162196005143045144236188237126077185076057" Size="37117" />

<File Name="csapi3t1.dll" Hash="071164211144136204149196127251168194082167196207073147167145" Size="25151" />

<File Name="sqdll.dll" Hash="001093243247112100005123020104046218078008216203154190233234" Size="48088" />

<File Name="migrate.dll" Hash="247106073105042095245071185154082231193238002156159027212163" Size="19934" />

<File Name="migrate.ini" Hash="165211176093249061213227078043167068055207226170130128217126" Size="1478" />

<File Name="msnread.htm" Hash="225174234203141194067230004236015066081162117205112132253151" Size="2636" />

<File Name="copymar.exe" Hash="037246075051221141152118110018039042171016246196076208013015" Size="30922" />

<File Name="msnms.ico" Hash="174088073234197219042105240147080251069093080241103116041014" Size="11132" />

<File Name="msncpq.ico" Hash="072052134122204103095084055034249090099123099023110222102238" Size="1587" />

<File Name="msndell.ico" Hash="233196142148081218026231250137196189025117213114158034229226" Size="2036" />

<File Name="msnemail.ico" Hash="079065027154132221009120228254187076034146096227241035228056" Size="9619" />

<File Name="dw.exe" Hash="203116166131183102034228049251132066110211089229169235150092" Size="79577" />

<File Name="dwprivacy.hta" Hash="246046109212201060072014018055060076199018235160144093155023" Size="422" />

<File Name="license.txt" Hash="177073050057003031039245181059059064051016183241076160127015" Size="3476" />

<File Name="1031dwintl.dll" Hash="002231003043088016210131193244062125011131157246035230242221" Size="6619" />

<File Name="signup.mar" Hash="225029173094124230228029251215250191045068229139070026127072" Size="149313" />

</Group>

<Group Name="Market" Url="..">

<File Name="market.mar" Hash="090164182255085249018042253002090236154170121128151046207011" Size="138373" />

<File Name="market.ini" Hash="124027011004043154130249070156143013233094135078250128200114" Size="177" />

</Group>

<Group Name="Brand">

<File Name="Setupmsn.inf" Hash="209137000128079246159003094191074002224238030003105180194219" Size="4052" />

</Group>

<Group Name="Messenger" Url="..%2F.." SetupExe="mmssetup.exe" Size="769976" Version="3,6,0,26">

<File Name="mcmess.dll" Hash="9,2000,1110,1" />

<File Name="msgsc.dll" Hash="3,6,0,26" />

<File Name="msgslang.dll" Hash="3,6,0,26" />

<File Name="msgsmigr.dll" Hash="3,6,0,26" />

<File Name="msgstrst.dll" Hash="3,6,0,26" />

<File Name="msmsgs.exe" Hash="3,6,0,26" />

<File Name="n2pcli.dll" Hash="2,1,16,0" />

</Group>

</Files>

</Package>

46 kB
Hochgeladen:30.12.2009
Downloadcounter158
Download
 
Windows XP SP2 XProfan X4
... und hier mal was ganz anderes als Profan ...
30.12.2009  
 




Uwe
''Pascal''
Niemeier
Hi Jörg!

aussi avec deiner XML aucun Probleme
Anscheinend wird chez dir qui Dossier pas geladen. Überprüf doch la fois den Dateipfad!
(Hab oui - comment toujours - aucun Fehlerabfrage incorporé)

BTW:...räusper... cela X: avant Books.xml ist mon Laufwerk et hat rien avec den Funktionen trop 1faire...
Hätte je peut-être erwähnen devoir...

HTH
Pascal
 
31.12.2009  
 



Vlt. am besten File per:
KompilierenMarqueSéparation
proc furi

    parameters s$
    return "file:///"+translate$(translate$(s$,"\","/"),"//","/")

endpr
 
31.12.2009  
 




répondre


Topictitle, max. 100 marque.
 

Systemprofile:

ne...aucune Systemprofil angelegt. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

s'il te plaît s'inscrire um une Beitrag trop verfassen.
 

Options du sujet

17.355 Views

Untitledvor 0 min.
Thomas Zielinski02.08.2024
Axel Berse12.07.2024
H.Brill14.06.2023
Erasmus.Herold06.01.2023
plus...

Themeninformationen



Admins  |  AGB  |  Applications  |  Auteurs  |  Chat  |  protection des données  |  Télécharger  |  Entrance  |  Aider  |  Merchantportal  |  Empreinte  |  Mart  |  Interfaces  |  SDK  |  Services  |  Jeux  |  cherche  |  Support

un projet aller XProfaner, qui il y a!


Mon XProfan
Privé Nouvelles
Eigenes Ablageforum
Sujets-La liste de voeux
Eigene Posts
Eigene Sujets
Zwischenablage
Annuler
 Deutsch English Français Español Italia
Traductions

protection des données


Wir verwenden Cookies seulement comme Session-Cookies à cause de qui technischen Notwendigkeit et chez uns gibt es aucun Cookies de Drittanbietern.

si du ici sur unsere Webseite klickst ou bien navigierst, stimmst du unserer Erfassung de Informationen dans unseren Cookies sur XProfan.Net trop.

Weitere Informationen trop unseren Cookies et en supplément, comment du qui Kontrolle par-dessus behältst, findest du dans unserer nachfolgenden Datenschutzerklärung.


d'accordDatenschutzerklärung
je voudrais keinen Cookie