XML Processing: xmlstarlet expression to find entries in one file and copy it to another

Slutfört Publicerat 5 år sedan Betalades vid leverans
Slutfört Betalades vid leverans

I need a shell script to do some XML processing, using xmlstarlet.

I have 2 xml files. I need to copy some elements from one file to the other.

Both files are the same kind. I want to find the following in [login to view URL]:

Under <glyf>, find this entire element:

<TTGlyph name="{0}" [... other attributes] >

[... content]

</TTGlyph>

Where {0} would be a list of strings to iterate a search for each string.

And then copy and replace in [login to view URL] where the same element occurs.

Then repeat the same operation under <gvar>:

<glyphVariations glyph="{0}">

[… content]

</glyphVariations>

I need to clarify {0} in:
<TTGlyph name="{0}" [... other attributes] >

I meant {0} would be a string, which would be from a list of strings that this script needs to iterate through for both type of elements.

Regular Expressions Shell-skript XML XSLT

Projekt-id: #18119070

About the project

1 offert Distansprojekt Aktivt 5 år sedan

Tilldelades:

grammal

Hi. As I understand, you would like a bash shell script that will replace some of the TTGlyph and glyphVariations in [login to view URL] with the versions in [login to view URL] with the same name, and xmlstarlet (xml) is an acceptable Mer

$35 AUD inom 1 dag
(15 omdömen)
4.8