SECT="subsection1"
sed -n "/<$SECT>/,/<\\\\$SECT>/ p" data.xml | sed '1d;$d' >temp
while read L
do
eval "$L"
done < temp
echo "X='$X' - Y='$Y' - Z='$Z'"
I'd like to find a way without temp file, but piping to ta "while read" loop creates a subshell so the variables aren't availaible out of the loop.
I saw something about that in a previous post but don't remember the title...
I need to know the way. I have got parsing down some nodes. But I was unable to get the child node perfectly. If you have code please send it. It will be very useful for me. (0 Replies)
Hi! I'm just new here and don't know much about shell scripting. I just want to ask for help in creating a shell script that will parse a string or value of the status in the xml file. Please sample xml file below. Can you please help me create a simple script to get the value of status? Also it... (46 Replies)
Hi All,
My requirement is create an unix script to parse the xml file and display the values of the Elements/value between the tags on console. Like say, I would like to fetch the value of errorCode from the below xml which is 'U007' and display it. Can we use SED command for this? I have tried... (10 Replies)
I have an xml file:
<AutoData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Table1>
<Data1 10 </Data1>
<Data2 20 </Data2>
<Data3 40 </Data3>
<Table1>
</AutoData>
and I have to remove the portion xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" only.
I tried using sed... (10 Replies)
Hi,
It's been a few years since college when I did stuff like this all the time. Can someone help me figure out how to best tackle this problem? I need to parse a file full of entries that look like this:
<eq action="A" sectyType="0" symbol="PGR" exch="CA" curr="VEF" sess="NORM"... (7 Replies)
Hi All,
I have been working on something that doesn't seem to have a clear regex solution and I just wanted to run it by everyone to see if I could get some insight into the method of solving this problem.
I have a flat text file that contains billing records for users, however the records... (5 Replies)
Hi,
I have to make an script according to these:
- I have couples of files like:
xxxxxxxxxxxxx.csv
xxxxxxxxxxxxx_desc.xml
- every xml file has diferent fields, but keeps this format:
........
<defaultName>2011-02-25T16:43:43.582Z</defaultName>
........... (2 Replies)
Hi,
Can anybody help to solve this. I want to parse some xmldata along with the URL in the Shell.
I'm calling the URL via the curl command
Given below is my shell script file
export... (7 Replies)
Hi
I have xml file with multiple records and would like to extract records from xml with specific condition if specific tag is present extract entire row otherwise skip .
<logentry revision="21510">
<author>mantest</author>
<date>2015-02-27</date>
<QC_ID>334566</QC_ID>... (12 Replies)
Discussion started by: madankumar.t@hp
12 Replies
LEARN ABOUT LINUX
xmerl_eventp
xmerl_eventp(3erl) Erlang Module Definition xmerl_eventp(3erl)NAME
xmerl_eventp - Simple event-based front-ends to xmerl_scan for processing
of XML documents in streams and for parsing in SAX style.
DESCRIPTION
Simple event-based front-ends to xmerl_scan for processing of XML documents in streams and for parsing in SAX style. Each contain more
elaborate settings of xmerl_scan that makes usage of the customization functions.
EXPORTS
file_sax(Fname::string(), CallBackModule::atom(), UserState, Options::option_list()) -> NewUserState
Parse file containing an XML document, SAX style. Wrapper for a call to the XML parser xmerl_scan with a hook_fun for using xmerl
export functionality directly after an entity is parsed.
stream(Fname::string(), Options::option_list()) -> xmlElement()
Parse file containing an XML document as a stream, DOM style. Wrapper for a call to the XML parser xmerl_scan with a continua-
tion_fun for handling streams of XML data. Note that the continuation_fun , acc_fun , fetch_fun , rules and close_fun options cannot
be user defined using this parser.
stream_sax(Fname, CallBack::CallBackModule, UserState, Options) -> xmlElement()
Types Fname = string()
CallBackModule = atom()
Options = option_list()
Parse file containing an XML document as a stream, SAX style. Wrapper for a call to the XML parser xmerl_scan with a continua-
tion_fun for handling streams of XML data. Note that the continuation_fun , acc_fun , fetch_fun , rules , hook_fun , close_fun and
user_state options cannot be user defined using this parser.
string_sax(String::list(), CallBackModule::atom(), UserState, Options::option_list()) -> xmlElement()
Parse file containing an XML document, SAX style. Wrapper for a call to the XML parser xmerl_scan with a hook_fun for using xmerl
export functionality directly after an entity is parsed.
AUTHORS
<>
xmerl 1.2.8 xmerl_eventp(3erl)