am 2021-12-03 12:35 PM
am 2021-12-03 01:29 PM
am 2021-12-03 01:43 PM
am 2021-12-07 11:28 AM
! Stiftset hat 255 Einträge
dim penwidth[255]
! Value inits
_ = ""
pos = ""
nodename = ""
nodevalue = ""
nodetype = ""
n_childnodes = 0
attrval = ""
attrname = ""
ch = open('xml', 'stifte.xml', 'rl')
! Initialen Positionsdeskriptor erhalten (= sind im Root)
r = input(ch, "NewPositionDesc", _, pos)
! pos @ AttributeFile
r = input(ch, "MoveToNode FromFirstChild Reg* ELEM", pos, nodename, nodevalue, nodetype)
! pos @ AttributeFile:RegisteredAttributes
r = input(ch, "NumberofChildNodes ELEM *", pos, n_childnodes)
! In den Node hineinbewegen
r = input(ch, "MoveToNode ToFirstChild", pos, nodename, nodevalue, nodetype)
! Durch Subnodes loopen, bis "Stifte" gefunden (Achtung, lokalisiert!)
for i=1 to (n_childnodes - 1)
r = input(ch, "MoveToNode FromNextSibling A* ELEM", pos, nodename, nodevalue, nodetype)
! Schauen, welchen Namen der Node hat (steht im Attribut "Type")
r = input(ch, "GetAttribute Type", pos, attrval, attrname)
if attrval = "Stifte" then
goto "break"
endif
next i
"break":
! Es wird immer die erste Stifttabelle ausgelesen
r = input(ch, "MoveToNode FromFirstChild PenTable ELEM", pos, nodename, nodevalue, nodetype)
! pos @ AttributeFile:RegisteredAttributes:Attributes[type=stifte]:PenTable
! Zum Übernode `Pens` hinein bewegen
r = input(ch, "MoveToNode FromFirstChild Pens ELEM", pos, nodename, nodevalue, nodetype)
! pos @ AttributeFile:RegisteredAttributes:Attributes[type=stifte]:PenTable:Pens
! In den Node hineinbewegen
r = input(ch, "MoveToNode ToFirstChild", pos, nodename, nodevalue, nodetype)
r = input(ch, "MoveToNode FromNextSibling Pen ELEM", pos, nodename, nodevalue, nodetype)
! pos @ 1. `Pen` Knoten
for i=1 to 255
! Breite des Stifts auslesen und speichern im Array
r = input(ch, "MoveToNode FromFirstChild Width ELEM", pos, nodename, nodevalue, nodetype)
r = input(ch, "MoveToNode ToFirstChild", pos, nodename, nodevalue, nodetype)
penwidth[i] = nodevalue
! Ebene wieder nach oben
r = input(ch, "MoveToNode ToParent", pos, nodename, nodevalue, nodetype)
r = input(ch, "MoveToNode ToParent", pos, nodename, nodevalue, nodetype)
! Zum nächsten Stift
r = input(ch, "MoveToNode FromNextSibling Pen ELEM", pos, nodename, nodevalue, nodetype)
next i
am 2021-12-07 01:00 PM
am 2021-12-07 05:58 PM
am 2021-12-08 08:50 AM
am 2021-12-08 05:45 PM
am 2021-12-09 09:45 AM
am 2021-12-09 06:58 PM