Skip to content

fabianmiu15/XML-Parser-Script-Bash-

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

XML Parser Script (Bash)

Description

This is a Bash script that allows you to read and write XML elements directly from the terminal.
It provides a simple menu-driven interface with two main operations:

  • Read an element: Retrieve the value of a specific XML element from a file.
  • Write an element: Add or update an XML element with a given value in a file.

Features

  • Search for an element and display its value if it exists.
  • Detect if an element is a parent element (without direct value).
  • Update the value of an existing element.
  • Add a new element before the root closing tag if it does not exist.
  • Basic error handling (missing root, invalid option, etc.).

Usage

  1. Make the script executable:
chmod +x xml_parser.sh
  1. Run the script:
./xml_parser.sh
  1. Choose an option from the menu:
XML - Parser Script
1: Citire element
2: Scriere element
Alegeti o optiune (1/2):

Technologies Used

  • Bash scripting
  • grep, sed, and basic Linux CLI tools

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages