This seems like XML, but there's an incorrect xml syntax in here: CDATA seems to be not correctly formed. (Is it just added manually to point out the data you want?)
Syntax used here is: [CDATA[**sometext]**]
CDATAs normal syntax is: [CDATA[some text]]
You can fix that with an intermediate file before using an xml parser like that:
With the Syntax fixed you may extract the wanted data as follows:
or as you likely want to have each result on a seperate line: Note
In parsing XML files with sed/awk one is dropping the advantages of a robust clear text file format and invites errors on any simple whitespace or ordering change(changed whitespace? (un-)compressed output?,...) of the file which is to be expected any time due to the nature of that file format.
--- Post updated at 12:34 PM ---
Hmmmm.... xmlstarlet is more convenient than xmllint:
Hi everyone,
Can anyone guide me on how to search through a huge file and look on specific column and if it finds a discrepancy on that column that does not conform to the specified criteria,
ie
(1) Numeric and (3) alpha chars F123 or G333..etc, etc!
then idientify it and redirect... (3 Replies)
First time poster (so please excuse me in advance) ;)
I have a webserver running linux, apache, etc. I have a list of HTML webpages that I want to delete because I think they are old. While I could delete them then check for broken links, I'd like to be more pro-active.
I want to write a... (2 Replies)
Hi
experts
problem:
i have a directory "DATA" with lots of subdirectories named as date with hudge data containning files.
Directory = "DATA"
subdirectory = "20090611" & "20090612" ......
20090611 = thousands of files
i wanna apply find command to find all files in... (3 Replies)
Hi All,
I am tring to insert a newline with "/" in a text file whenever there is the text "end;"
right now I have inside file:
.
.
end;
I want to have:
.
.
end;
/
I tried doing the following within the file
:g/^end;/s//end; \/ / (4 Replies)
Hi ,
I have input file and i want to extract below strings
<msisdn xmlns="">0492001956</ msisdn> => numaber inside brackets
<resCode>3000</resCode> => 3000 needs to be extracted
<resMessage>Request time
getBalances_PSM.c(37): d out</resMessage></ns2:getBalancesResponse> => the word... (14 Replies)
hi,
I want to store from 102 character to 128 character to a variable of header record which can be identified as 'HDR' which is the first 3 characters in the same line of a same.txt file.
Please advise.
Thanks (4 Replies)
Hi All,
Thanks in advance
File is generated with following format
31000000.xml to 48999999.xml
74000000.xml to 88999999.xml
Above range should be find and moved into the folder named abc
and below is another range should should be find and moved into folder named xyz
... (1 Reply)
Hi All,
I am trying to find 4 latest files inside one folder having following File Name pattern and store them into 4 different variables and then use for processing in my shell script. File name is fixed length.
1) Each file starts with = ABCJmdmfbsjop letters + 7 Digit Number... (6 Replies)
I have unix file like below
>newuser
newuser
<hello
hello
newone
I want to find the unique values in the file(excluding <,>),so that the out put should be
>newuser
<hello
newone
can any body tell me what is command to get this new file. (7 Replies)
Hi,
I have log file which rolls out every second which is as this.
HttpGenRequest - -<!--OXi dbPublish--> <created="2014-03-24 23:45:37" lastMsgId="" requestTime="0.0333"> <response request="getOutcomeDetails" code="114" message="Request found no matching data" debug="" provider="undefined"/>... (3 Replies)
Discussion started by: karthikprakash
3 Replies
LEARN ABOUT DEBIAN
mtext_serialize
mtext_serialize(3m17n) The m17n Library mtext_serialize(3m17n)NAME
mtext_serialize - Serialize text properties in an M-text.
SYNOPSIS
MText* mtext_serialize (MText * mt, int from, int to, MPlist * property_list)
DESCRIPTION
Serialize text properties in an M-text. The mtext_serialize() function serializes the text between from and to in M-text mt. The
serialized result is an M-text in a form of XML. property_list limits the text properties to be serialized. Only those text properties
whose key
o appears as the value of an element in property_list, and
o has the symbol property Mtext_prop_serializer
are serialized as a 'property' element in the resulting XML representation.
The DTD of the generated XML is as follows:
<!DOCTYPE mtext [
<!ELEMENT mtext (property*,body+)>
<!ELEMENT property EMPTY>
<!ELEMENT body (#PCDATA)>
<!ATTLIST property key CDATA #REQUIRED>
<!ATTLIST property value CDATA #REQUIRED>
<!ATTLIST property from CDATA #REQUIRED>
<!ATTLIST property to CDATA #REQUIRED>
<!ATTLIST property control CDATA #REQUIRED>
]>
This function depends on the libxml2 library. If the m17n library is configured without libxml2, this function always fails.
RETURN VALUE
If the operation was successful, mtext_serialize() returns an M-text in the form of XML. Otherwise it returns NULL and assigns an error
code to the external variable merror_code.
SEE ALSO
mtext_deserialize(), Mtext_prop_serializer
COPYRIGHT
Copyright (C) 2001 Information-technology Promotion Agency (IPA)
Copyright (C) 2001-2011 National Institute of Advanced Industrial Science and Technology (AIST)
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License
<http://www.gnu.org/licenses/fdl.html>.
Version 1.6.2 12 Jan 2011 mtext_serialize(3m17n)