LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 09-17-2006, 01:26 PM   #1
metalx1000
Member
 
Registered: Jun 2006
Distribution: Debian
Posts: 112

Rep: Reputation: 16
Broken XML


The following is part of an XML file I'm working with at work.

Code:
<ans_type>2</ans_type>
<ans_guid>1270B4CE-AB12-4C4B-8135-EF501297B983</ans_guid></ant>
<t><ans_position>2</ans_position><ans_text>time locate</ans_text><ans_type>2</ans_type>
<ans_guid>87BC9D34-9A63-4140-BC54-1667682FD9C6</ans_guid>
</ant><ant><ans_position>3</ans_position><ans_text>
I need to write a shell script that will remove ever thing except what is between the 'ans_type's and also the 'ans_guid's and put them into a text file

Exp. text file:

2 1270B4CE-AB12-4C4B-8135-EF501297B983
2 87BC9D34-9A63-4140-BC54-1667682FD9C6


I've been trying to use 'sed' But I'm new to useing that command and can't seem to get it write. Maybe I shouldn't be useing 'sed'.

Thanks for the help.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
checking for XML::Parser... configure: error: XML::Parser perl module is required for kornerr Linux - General 11 11-16-2008 07:24 AM
How to use XML AMMullan Programming 7 12-15-2006 09:31 AM
configure: error: could not find DocBook XML DTD V4.1.2 in XML catalog Fadoksi Linux - Software 1 07-16-2006 06:41 AM
xml bong.mau Programming 1 11-22-2005 02:52 PM
Help with xml Drogo Linux - General 1 10-26-2002 01:13 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 08:19 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration