I have a logback.xml configured in a spring MVC + hibernate project, it is working fine on my local machine. the local machine has windows 10 OS installed. I wish to run the code of production machine which has Linux installed. What is want to know, is there a way to make LOG_PATH and LOG_ARCHIVE locations dynamic according to OS
Tag: xml
How can I edit an xml line from user data in ec2 instance?
I am using Wowza streaming engines in multiple ec2 instances that are spinned up from backend. I need a way of linking the edge instances with the origin and for that I need to update the value of a particular line in an xml file. I have the ip loaded in the user-data by the time the edges spin up.
How can I extract text from between two xml tags using sed
I have the following output from curl: How can I retrieve the text between <id> and </id>? I tried using: but that results in the entire block of text being printed out instead of just the part between and <id>. I don’t have the ability to install programs on this box so I’d rather not go through the hassle of
Finding the number of xml files having a particular word in a directory
I read Chris Maes answer on how to a grep for a particular word in any file/files contained in a directory, and it worked. But, what is the way of finding the names of the files and the total number of files containing that word ? Please correct me if I am wrong. Thanks in advance !! Answer You just
How do I append or prepend to an attribute in an xml file using xmlstarlet or similar?
Did not see it in the docs. Here’s what I’m trying to do: I want to pre-append the prefix 1_ to t. Expected Output: Actual Output: Answer Try this: -v is for fixed values, -x is for xpath expressions.
how to replace [^u0009u000Au000Du0020-uD7FFuE000-uFFFDu10000-u10FFF]+ to “” in a file by sed or anything?
I find and replace some strange characters in xml file with text editor. with regular expression Now, I need to it in linux command line. I ask you how to use sed or anything that same find and replacement job in linux command line. Thank you in advance Answer You can try this : Before replacing, be sure you really
XSLT: add element, read content from file
I ran into a complicated XSLT question. Input.xml Here I want to add a new element <DESCRIPTION>. The tricky part: the content are in separate files, the file name of the description file is the : (00050802.html,00033802.html === <ID>.html). The .html contains some html code, so the content should be enclosed in CDATA. Output.xml XSLT version does not matter. Answer
XML to postscript using xsltproc
I’m trying to produce a postscript file for an XML document. I can produce a plain text or an html output using xsltproc. Is there a way to produce a postscript file from command line or programmatically using C? Answer One possibility to achieve this is converting the XML-file to XSL-FO and then use Apache-FOP to transform it to a
Merge XML files and delete duplicate rows
I’m using the following script to merge XML files. There are 5 different XML file types, ItemAvailability.xml, ItemUpsert.xml, ItemCatDesc.xml, ItemPrice.xml and ItemDelete.xml. How can I have the same script remove duplicate rows from the combined XML files? I really only need the duplicates removed from the ItemAvailability.xml files, the script is run on a 15-minute interval cron job. Any ideas
Unix – Uncomment xml comments
I have below node from XML file. How do I uncomment the first occurrance of mainHost using Unix shell script or commands? I have tried with below command with different variations but that does not seem to work. sed ‘0,/<!– /{s/<!– //}’ /test.xml I am expecting below output Thanks Answer You were on the right track (under the assumption that