Works for me, maybe you typo'd a tag name? Note that <Tag/> and <Tag></Tag> are 100% identical as far as xmlstarlet is concerned. ~/tmp$ cat input.xml <Object> <SourceTag>Text</SourceTag> <TagToUpdate></TagToUpdate> </Object> ~/tmp$ xmlstarlet ed -u /Object/TagToUpdate -x '/Object/SourceTag/text()' input.xml <?xml version="1.0"?> <Object> <SourceTag>Text</SourceTag> <TagToUpdate>Text</TagToUpdate> </Object> ~/tmp$ xmlstarlet --version 1.6.1 compiled against libxml2 2.9.2, linked with 20904 compiled...
On Thu, Aug 10, 2017 at 3:53 PM, Arvid Egbertzen email@example.com wrote: I need to copy, for multiple lines, the contents of <SourceTag>Text</SourceTag> to <TagToUpdate></TagToUpdate> (empty).. I assumed the edit-update function was the correct one. It seems to be doing something, but the result is the same as when I started. Is the "/Object/SourceTag" allowed as parameter? Most examples have a hardcoded text. xml ed -u "/Object/TagToUpdate" -v "/Object/SourceTag" MyXMLFile.xml If not allowed,...
Validation against XSD with pattern
xmlstarlet-1.5.0 validation function misses internal links check
Dealing with large file.
xml ed -L -P changes CRLF to LF on Windows
Unfortunately, turning off CRLF is the only reasonable way to avoid adding ASCII CRs in a UTF-16 document. You can avoid this by using UTF-8 instead.
src/xml_depyx.c:209]: (error) Resource leak: in