Sjur Moshagen wrote:
> 
> By programming, I assume you mean Java programming?
> 

Yes.



>> * Please consider writing a few macro commands. Example: a smarter split.
> 
> This is what I ended up doing, by first recording my actions, and then 
> copying the resulting macro to the xxe configuration, and modifying it as 
> needed.
> 
> One small issue still remains: I would like to copy the value of one 
> attribute from the origing element when creating new siblings as described in 
> my first post. I could not find any way of doing it using the GUI (and thus 
> no way to record the actions), but I did find the following java command:
> 
> http://www.xmlmind.com/xmleditor//_distrib/doc/api/com/xmlmind/xmledit/cmd/attribute/SetAttributeValue.html
> 

You don't need to refer to this kind of (programmer's) documentation.
The documentation of interest in your case is:

XMLmind XML Editor - Commands
http://www.xmlmind.com/xmleditor/_distrib/doc/commands/index.html

This documents contains the reference of all native XXE commands and
explains how to write custom macro-commands.




> Combined with some macro commands it should be possible to get the attribute 
> value of the preceeding sibling (the old element), and add the attribute with 
> the specified value to the current element. But I'm unable to see how to tie 
> these things together, and I could find no examples of using that java 
> command.
> 
> Could you give me some hints on how to proceed?
> 

There is no way to do this by simply recording a macro. You need to
write the macro by hand and use in it:

* The (XPath-based) <get> child element of <macro> to obtain the value
of the attribute.

See http://www.xmlmind.com/xmleditor/_distrib/doc/commands/xpath_get.html

*  The (XPath-based) <set> child element of <macro> to save the value of
the attribute in a variable.

* Command putAttribute to set the attribute on the newly created element.

See http://www.xmlmind.com/xmleditor/_distrib/doc/commands/putAttribute.html





 
--
XMLmind XML Editor Support List
[email protected]
http://www.xmlmind.com/mailman/listinfo/xmleditor-support

Reply via email to