View Data in XML file


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting View Data in XML file
# 1  
Old 03-29-2011
View Data in XML file

I'm unable view data of a xml file..i just display something like the attached. Please see the attached.

I'm trying to create a script which would prase the xml file and display the content. since the content is encoded..i'm unable to see the actul data using my script.

Thank you!
View Data in XML file-xml_filegif
# 2  
Old 03-29-2011
Code:
strings yourfile.xml

but i guess the way you added the gif image in your xml file is not correct.

Last edited by ctsgnb; 03-29-2011 at 12:56 PM..
# 3  
Old 03-29-2011
Quote:
Originally Posted by ctsgnb
Code:
strings yourfile.xml

I used strings and its still shows the same.
# 4  
Old 03-29-2011
what gives

Code:
file yourfile.xml

??
# 5  
Old 03-29-2011
it says

Quote:
my_file.xml: ascii text
Quote:
Originally Posted by ctsgnb
what gives

Code:
file yourfile.xml

??
# 6  
Old 03-29-2011
is the display still nested with :

Code:
less yourfile.xml

and then
Code:
strings yourfile.xml | less

Do you connect using PuTTY ? if so, i guess there are also some parameter to change somewhere to make it immune to the received escape sequences.

you can also see if you have better result with ome other display commands such as
Code:
more
cat
pg

---------- Post updated at 06:09 PM ---------- Previous update was at 06:03 PM ----------

You can also give some try after various changes in
PuTTY -> Terminal -> Feature -> Disable remote-controlled character set configuration
or other
PuTTY -> Terminal -> Feature -> Disable remote-controlled * parameters
# 7  
Old 03-29-2011
You will have to convert the character references (the string &# followed by either a decimal or hexadecimal value followed by a colon, which specifies the ISO 10646 code point for a particular glyph) in each element of your XML document. This is what a Web Browser does; it displays the appropriate glyph for each character reference.

Can you supply us with a complete sample XML document and what locale you wish to use?

Just thought of something - you probably can use iconv to do the conversion.

Last edited by fpmurphy; 03-29-2011 at 02:56 PM..
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Extract Data from XML file.

Hi Guys, I am in a need to extract data from a xml file. The XML file format is as below. <data jsxnamespace="propsbundle" locales=""> <locale> <!--Error messages starts--> <record jsxid="CHARPAIR001" jsxtext=" must be selected"></record> <record... (1 Reply)
Discussion started by: Showdown
1 Replies

2. Shell Programming and Scripting

Need Help in extracting data from XML File

Hi All My input file is an XML and it has some tags and data rows at end. Starting of data rows is <rs:data> and ending of data rows is </rs:data>. Within sample data rows (2 rows) shown below, I want to extract data value after equal to sign (until space or "/" sign). So if XML data... (7 Replies)
Discussion started by: vx04
7 Replies

3. Shell Programming and Scripting

Extract data from XML file

Hi , I have input file as XML. following are input data #complex.xml <?xml version="1.0" encoding="UTF-8"?> <TEST_doc xmlns="http://www.w3.org/2001/XMLSchema-instance"> <ENTRY uid="123456"> <protein> <name>PROT001</name> <organism>Human</organism> ... (1 Reply)
Discussion started by: mohan sharma
1 Replies

4. AIX

Can't able to view the data in a file using the VI editor

I am unable to view the data in a file using the vi editor.....it is showing as all @ ( at the rate symbols). When I use the cat command, it showing the data. Please help me to how to view the data in VI editor, as I need to edit the data. Even I tried to edit using sed but that couldn't help... (9 Replies)
Discussion started by: tsurendra
9 Replies

5. Shell Programming and Scripting

Need help in extracting data from xml file

Hello, This is my first post in here, so excuse me if I sound too noob here! I need to extract the path "/apps/mp/installedApps/V61/HRO/hrms_01698_A_qa.ear" from the below xml extract. The path will always appear with the key "binariesURL" <deployedObject... (6 Replies)
Discussion started by: abhishek2386
6 Replies

6. Shell Programming and Scripting

data extraction from xml file

I have an of xml file as shown below <?xml version='1.0' encoding='ASCII' standalone='yes' ?> <Station Index="10264" > <Number Value="237895890" /> <Position Lat="-29.5" Lon="3.5" /> <MaxDepth Value="-4939" /> <VeloLines Count="24"> <VeloLine Index="0" > <Depth... (3 Replies)
Discussion started by: shashi792
3 Replies

7. UNIX for Dummies Questions & Answers

Extracting data from an xml file

Hello, Please can someone assist. I have the following xml file: <?xml version="1.0" encoding="utf-8" ?> - <PUTTRIGGER xmlns:xsd="http://www.test.org/2001/XMLSchema" xmlns:xsi="http://www.test.org/2001/XMLSchema-instance" APPLICATIONNUMBER="0501160" ACCOUNTNAME="Mrs S Test"... (15 Replies)
Discussion started by: Dolph
15 Replies

8. Shell Programming and Scripting

Read data in XML file

Hello Everybody, I have a question on reading the data from XML file through KSH shell script. In the below file I need to collect the patient control no and its respective insured id. I need to have pair of these values in single line separated by some special character, so that I could use... (2 Replies)
Discussion started by: swame_sp
2 Replies

9. Shell Programming and Scripting

How To get the data from a tag in XML File

Hi I have a XML file in which data is loaded from a relational table and the column names are tags in the xml file which is shown below. ... (8 Replies)
Discussion started by: naughty21
8 Replies

10. Shell Programming and Scripting

Extracting Data from xml file

Hi ppl out there... Can anyone help me with the shell script to extract data from an xml file. My xml file looks like : - <servlet> <servlet-name>FrontServlet</servlet-name> <display-name>FrontServlet</display-name> ... (3 Replies)
Discussion started by: nishana
3 Replies
Login or Register to Ask a Question