David Mundie wrote: > XMLEditor's run + insertString is a powerful technique, but what if what > you want to compute XML markup to be parsed and added to the document? > insertString seems to implicitly quote markup. > > To take the example from the documentation: > > <command name="insertCommandOutput"> > <macro> > <sequence> > <command name="run" /> > <command name="insertString" parameter="%_" /> > </sequence> > </macro> > </command> > > If I use this to run a shell script that simply returns an element, e.g. > > #!/bin/sh > echo "<i>This is a test</i>" > > what gets inserted into the document is not an "i" node, but rather the > string "<i>Thisis a test</i>", which is not what I want. How > can I get XMLEditor to parse the result of the command? Sorry if this > has been asked before; I have searched the mail archive and the > documentation and didn't see anything.
You need to use "paste" instead of "insertString" and the string to be inserted must start with "<?xml ". See http://www.xmlmind.com/xmleditor/_distrib/docs/commands/ch06s34.html Example: --- #!/bin/sh echo "<?xml version="1.0"?><i>This is a test</i>" --- --- <command name="insertCommandOutput"> <macro> <sequence> <command name="run" /> <command name="paste" parameter="into %_" /> </sequence> </macro> </command> ---

