A simple, very flexible text format that stands for eXtensible Markup Language.

learn more… | top users | synonyms

1
vote
0answers
31 views

Can gedit highlight element of svg stucture?

Gedit can show matching parenthesis. Can it do the same with tags of an SVG file ? For example when I mark <text> I need to find closing </text> tag.
0
votes
2answers
1k views

Failed dependencies trying to install package 'libxml2'

I am trying to install libxml2, but my system complains about dependencies. The dependent packages exist on system. The ultimate goal is to install xml_grep2, I have been trying various methods ...
0
votes
1answer
15 views

Update of XML value with xmlstarlet

I have file config.xml: <?xml version="1.0" encoding="utf-8"?> <widget xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0" id="app" version="2.5" ...
1
vote
1answer
26 views

How do I get a list of the values of matching attributes using xmllint and xpath?

I'm trying to use xmllint to parse names of Solr cores from the configuration file. This works: xmllint --xpath /solr/cores/core/@name solr.xml |grep -Po '(?<=name=")[a-z-]+(?=")' And it returns ...
2
votes
5answers
149 views

Re-order text on each line in a file

I'm processing a log file and I need reorder each line (not sort). The log file looks like this: 11-06-2014 - 10:49:06PM lat = 41.858657; lon = -91.345142 11-06-2014 - 10:49:49PM lat = ...
1
vote
1answer
83 views

Split very big xml file into little pieces with specific line number count

This is how I did to extract the first 100000 lines from my big xml file (2gb): head source.xml -n 100000 > part.xml How can I keep splitting them to 100000 line (or specific file size chunks) ...
0
votes
1answer
2k views

How to parse XML to CSV with a shell script?

What is the ideal way to parse an .xml file into a .csv file that I could include with my shell scripts. I know bash cant do it but I'm unsure if I should try in awk or sed. I imagine a language ...
0
votes
2answers
179 views

Split XML file into multiple files

I have an xml file that have different nodes, I want to split files like this: <unix> <mm> </unix> <osx> <nn> </osx> When I run the script I want it to make ...
1
vote
1answer
122 views

Convert XML to SQL INSERT statements using the command line

Is there a way to convert XML to SQL INSERT using the command line, here is examples: <something> <somthingelse>lol</somethingelse> </something> would be INSERT INTO ...
1
vote
1answer
180 views

Confused about how to convert XML to CSV using xmlstarlet on OS X?

I asked a question earlier and it was closed as being a duplicate: How to parse XML to CSV with a shell script?. The answer in the duplicate that was linked suggested using a tool called XMLStarlet, ...
2
votes
2answers
172 views

How do I actually read an XML file in human form that makes sense?

I downloaded a catalog and it is in XML format. How do change it from code to human-readable form, and ideally save it as a plain text file? I've never worked/seen these before; I tried messing with ...
3
votes
0answers
53 views

Convert Evolution filters.xml file to Thunderbird msgFilterRules.dat?

I migrated evolution to Thunderbird yesterday. I googled for migrate filters, but Evolution stores them as an XML file and Thunderbird stores using a Mork formatted file such as: version=`9` logging= ...
0
votes
1answer
60 views

How do I replace the '&#x5c' with '/' in file using the command line?

After grep line with AAA/BBB/CCC but the output file consists only the line as AAA"& #x5c;"BBB"& #x5c;"CCC.. How do I fix this?
0
votes
0answers
95 views

Making A Shell Script To Write To XML File

I am writing a shell script to make writing my RSS a whole lot easier. Right now I am stuck at how to properly edit my files. See, I want the program to take in data from me, and then save those to ...
1
vote
1answer
426 views

Modify XML file based on partial name

I've been using Xmlstarlet to modify some .xml files but I am lost trying to figure out how to modify a tag based on a partial name. What is the best way to comment out an entire line that begins ...
1
vote
2answers
97 views

How to remove nodes from a HUGE (>2gb) XML file?

I'm working with several huge (>2gb) XML files and their size is causing problems. (My application uses XMLReader in a PHP script to parse smaller ~500mb files, and that works fine, but XMLReader ...
2
votes
2answers
2k views

How do I parse namespaces from an XML file using XMLLINT and BASH

Below I have an example of an Adobe XML swidtag used to track inventory. I need to parse out relevant information using xmllint in bash and output that to a new text file. For example I would like ...
4
votes
5answers
231 views

Insert Lines after Multi-Line Regex Match

I've got an XML file I need to append to after a specific set of tags. Basically the file structure looks like this: <key>servers</key> <dict> ... Server Details ... </dict> ...
0
votes
0answers
34 views

How to get ids from xml file into mysql?

I've got 8 xml files and need to do some work on these records in mysql. What is a good way to get these IDs into mysql? <?xml version="1.0" encoding="utf-8"?> <Records> <Record> ...
1
vote
2answers
52 views

search and replace string

I have a XML tag for example <tag name="abc"></tag> I wanted to replace the string inside "" with the tag name i.e the upper XML tag should be become now <abc ...
3
votes
1answer
621 views

Convert xml subtitle file to srt format

I have a xml subtitle that looks like this: <?xml version="1.0" encoding="utf-8" ?><transcript> <Item from="1.16" duration="4.68"><![CDATA[(Dong-hyuk is coming to see you now.) ...
1
vote
1answer
124 views

Why isn't this XMLStarlet Query Working?

I'm trying to write a simple bash script that parses price info from the ebay developer API search results. Here's an example of XML search results for "Detective Comics 700": ...
4
votes
6answers
580 views

sed first n occurrences result set between 2 tags / patterns

I have a big XML file and I get all occurrences between 2 tags: Here is what I do: sed -n '/<tag>/,/<\/tag>/p' file.xml And I need to filter to get only first N occurrences. I've ...
2
votes
1answer
43 views

XML command line tool postgres

I have an XML files to read and load into database daily at night (cron) So i planed to do this in a batch. Is there any command line tool to : 1. Create a postgres schema using an XSD file? 2. ...
2
votes
1answer
66 views

Substite values from file1 to file2 awk

I have input file in xml FILE1 : <Sector sectorNumber="1"> <Cell cellNumber="1" cellCreated="YES" cellIdentity="" cellRange="35000" numberOfTxBranches="1" hsCodeResourceId="0"/> ...
7
votes
1answer
311 views

How can I split Openbox `rc.xml` into multiple files?

I don't like big text configuration files. So, I would like to split my rc.xml file into multiple files: rc.xml rc.keyboard.xml rc.mouse.xml
0
votes
1answer
420 views

XML modify and writing to file beautiful soup

I am using python beautiful soup to parse an XML file and write it to a different file after deletion of certain tags. But, using soup.prettify changes other XML namespaces and attribute names. f = ...
0
votes
1answer
174 views

python xml parsing

I have to delete particular tags from an xml file. Sample xml below. <data> <tag:action/> </data> I want to delete all contents between data and /data. ...
0
votes
0answers
177 views

Strange issue with xml_split in Linux

I am using the code xml_split from https://metacpan.org/pod/distribution/XML-Twig/tools/xml_split/xml_split to split a huge XML file. I am facing a strange issue with this. First, I tried the ...
0
votes
0answers
111 views

Setting up apache axis client on centos

I have below codes. import java.util.*; import java.io.*; import java.net.URLConnection; import java.net.MalformedURLException; import org.apache.axis.client.Call; import ...
0
votes
0answers
132 views

How to format xml attributes, not just elements

How do you format an XML document to make it easy to read element attributes? I have a xml based webservice that returns one or two elements, but with hundreds of attributes. As I'm doing ...
1
vote
2answers
84 views

Egrep multiple strings in an XML file

I have a collection of XML files in a standard format that I'd like to search to see if they match two strings. Here is the idea: <ELEMENT1>Dave</ELEMENT> ...
3
votes
5answers
21k views

Parse XML to get node value in bash script?

I would like to know how I can get the value of a node with the following paths: config/global/resources/default_setup/connection/host config/global/resources/default_setup/connection/username ...
1
vote
3answers
76 views

Use Unix tools to look for a definition block in an XML.

I am using an XML that has definitions in this form - <definition name="ticketOpen" extends="ticketUpdate"> <put name="title" value="Open Ticket" /> <put name="mainForm" ...
1
vote
1answer
232 views

Parsing an xml RSS feed file

What I would like to achieve is to receive an email with the failures of my VPS. I tried to do that by downloading an rss feed XML file from my VPS provider which contains all the failures, down ...
0
votes
2answers
195 views

How to delete a line containing pattern which is first found after a specific pattern

I am writting a shell script to delete an entry from a specific group. eg: file name is dest.xml <domain id="1" group_name="group1"> <node id="ABC"> <node id="PQR"> ...
1
vote
1answer
1k views

How to find out the content of a XML file using Unix Sed/Awk? [duplicate]

I have a XML file(MyXML.xml) like this : <?xml version="1.0" encoding="UTF-8"?> <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"> <S:Body> ...
1
vote
1answer
418 views

Parse JSON or XML on bootup

I'm compiling my own version of the linux kernel and I was wondering if there is any way to do parse a local XML or JSON file.
2
votes
1answer
146 views

How can I setup ~/.tidyrc file for XML?

How do you configure tidy to parse XML instead of HTML? Explanation: A while ago, a co-worker showed me a trick to use tidy to clean up XML. Apparently, you create a tidyrc file like so: ...
-2
votes
1answer
135 views

Get values in an XML File - Requirement : It must be done in bash/Unix [closed]

Sorry If this question has already been asked but I did not find my answer yet. Here is an extract of my XML file : <Value ProtectInMemory="True"> ...
4
votes
2answers
68 views

How to add a line from a list into another file when a specified line is found?

Basically I have 2 files. One has a list of router and switch login prompts, like this: user@router1 user@router2 user@switch1 user@switch2 The other file has blocks of XML, like this: ...
1
vote
1answer
4k views

XML parsing using xmllint and customizing the output

I have xml file (say input.xml) of the following schema: <?xml version="1.0"?> <TagA> <TagB> <File Folder="FOLDER1M\1" File="R1.txt" /> </TagB> ...
3
votes
3answers
2k views

Delete XML node containing certain element

I want to remove all Placemarks from a KML file that contain the element <tessellate>. The following block should be wholly removed: <Placemark> ...
0
votes
3answers
1k views

How to check well-formedness of 4GB XML file?

I want to check well-formedness of a big XML file. (about 4GB.) However, when I try xmlwf, all it tells me is filename.xml: Value too large for defined data type What to do with it? Is there any ...
2
votes
1answer
125 views

Is there a command line tool for validating RDF files?

I am looking for a substitution of the W3C RDF Validator, as it is broken, in addition I want something a bit more automated, such as a command line tool. I have been using xmllint for checking XML ...
0
votes
2answers
853 views

How to find and replace a particular string in a specific line

I developed a code which find and replaces a specific string in all xmls under all subdirectories. But i dont want all occurances to be replaced. In entire xml, code should find the tag xyz and ...
5
votes
1answer
5k views

how to compare two xml files having same data in different lines?

I have two files have same data but in different lines. File 1: <Identities> <Identity> <Id>048206031415072010Comcast.USR8JR</Id> ...
9
votes
1answer
2k views

Vim: Making XML text “pretty”

Is there an easy way within vi to make your XML text "pretty"? For example: I want this.. <person> <name>Nick</name> <age>26</age> ...
3
votes
2answers
1k views

Insert a multiline string into another string

I need to insert lines into an xml file : Insert <one> </one> into <tags> </tags> To obtain <tags> <one> </one> </tags> I tried this: ...
0
votes
2answers
445 views

Increment xml files with bash

A good mate on a forum had helped me with creating this script but everything Ive thrown at it outputs wrong and I do not know why or what is the issue. I ran all my script in ubuntu's terminal if ...