dynamically extend xform model / instance

Creating a macro - Writing a Script - Using the API (OpenOffice Basic, Python, BeanShell, JavaScript)
Post Reply
PhilippH
Posts: 2
Joined: Tue Nov 11, 2008 10:19 pm

dynamically extend xform model / instance

Post by PhilippH »

Hi,
Is it possible to add a new node to an instance of an xform model?
or an element to the model itself?

I looked in the api, and found functions like appendNode for XNode, or createElement for XDocument, but I didnt managed to get it working.
(even to clone a Node (which worked well, like providing a .NodeValue and so on), didnt work.... got null for xNode2 after :
xNode2 = xNode1.cloneNode(true)
but anyway, I the reason why I want to do this, is I want to add new TAG/Nodes/.. dynamically to my xForm schema , add binding and create the new form elements afterwards,...within my code...

has someone done something like that before?
I am currently trying to achieve that with BASIC...is it maybe easier in java?

I am happy about every reply... :)

thx
OOo 3.0.X on Ms Windows XP
Post Reply