|
Home > Archive > Unix administration > January 2005 > xml reader?
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
|
|
| bingster 2005-01-12, 5:55 pm |
| I apologize in advance if this is not the right place for posting such a
question. If anybody can point me to the right direction, I would
greatly appreciate it.
Linux 2.4.21-27.0.1.EL #1 Mon Dec 20 18:56:53 EST 2004 i686 i686 i386
GNU/Linux
In general, how to make a XML file user readable? We have some log
files that are in XML format. Is there anyway on linux to convert the
XML format to other format, like plain text or html...?
Thanks,
Bing
| |
| Ole-Morten Duesund 2005-01-12, 5:55 pm |
| On 2005-01-12, bingster <bdu@iastate.edu> wrote:
> I apologize in advance if this is not the right place for posting such a
> question. If anybody can point me to the right direction, I would
> greatly appreciate it.
>
> Linux 2.4.21-27.0.1.EL #1 Mon Dec 20 18:56:53 EST 2004 i686 i686 i386
> GNU/Linux
>
> In general, how to make a XML file user readable? We have some log
> files that are in XML format. Is there anyway on linux to convert the
> XML format to other format, like plain text or html...?
Since xml is just a markup language the way to present it will depend on
what's inside it. However, there are editors and viewers available "out
there". Personally I use firefox (or mozilla) if it doesn't know how to
properly present an xml file, it will show you a nice collapsible tree
view of the file.
HTH
--
Ole-Morten Duesund
My opinions are yours - oh yes, they are.
| |
| Slowdude 2005-01-12, 5:55 pm |
|
> In general, how to make a XML file user readable? We have some log
> files that are in XML format. Is there anyway on linux to convert the
> XML format to other format, like plain text or html...?
The canonical way is to use xslt for that. A decent introduction is at:
http://www.w3schools.com/xsl/
slowdude@zerofluid.com
| |
| bingster 2005-01-12, 5:55 pm |
| Oh, that's a smart idea. So that needs these log files to be placed
somewhere under the documentroot on a webserver so that they can be
viewed in the browsers, right? hmmm... this is our file server that does
not run any web servers.
Bing
Ole-Morten Duesund wrote:
> On 2005-01-12, bingster <bdu@iastate.edu> wrote:
>
>
>
> Since xml is just a markup language the way to present it will depend on
> what's inside it. However, there are editors and viewers available "out
> there". Personally I use firefox (or mozilla) if it doesn't know how to
> properly present an xml file, it will show you a nice collapsible tree
> view of the file.
>
> HTH
| |
| Ole-Morten Duesund 2005-01-12, 5:55 pm |
| On 2005-01-12, bingster <bdu@iastate.edu> wrote:
> Oh, that's a smart idea. So that needs these log files to be placed
> somewhere under the documentroot on a webserver so that they can be
> viewed in the browsers, right? hmmm... this is our file server that does
> not run any web servers.
Don't need to put them on a webserver - just open as a
file:///whatever.xml
And please don't top-post.
--
Ole-Morten Duesund
My opinions are yours - oh yes, they are.
| |
| Kermit Tensmeyer 2005-01-14, 5:52 pm |
|
"bingster" <bdu@iastate.edu> wrote in message
news:34ldh9F4be1bvU1@individual.net...
> Oh, that's a smart idea. So that needs these log files to be placed
> somewhere under the documentroot on a webserver so that they can be viewed
> in the browsers, right? hmmm... this is our file server that does not run
> any web servers.
I guess the real question would be: What did you want to do with these
files?
browse them as text?
generate reports from the data contained in this files?
XML files are text files (except for binary XML). There are a lot of unix
tools available to process
xml files, and XSLT will transform XML files of one format into files of a
different format.
programs to read XML include C, Java, Perl, Saxon etc.
can you be a little more clear as to what you want to do with these files?
| |
| bingster 2005-01-18, 5:56 pm |
| Thanks for the information.
I want to browse these xml files as plain text, better without any xml
tags. After reading some XSLT docs, guess I need to write somekind of
style sheet to specify how I want the xml files to be converted?
Bing
Kermit Tensmeyer wrote:
> "bingster" <bdu@iastate.edu> wrote in message
> news:34ldh9F4be1bvU1@individual.net...
>
>
>
> I guess the real question would be: What did you want to do with these
> files?
> browse them as text?
> generate reports from the data contained in this files?
>
> XML files are text files (except for binary XML). There are a lot of unix
> tools available to process
> xml files, and XSLT will transform XML files of one format into files of a
> different format.
>
> programs to read XML include C, Java, Perl, Saxon etc.
>
> can you be a little more clear as to what you want to do with these files?
>
>
| |
| bingster 2005-01-19, 5:53 pm |
| Ole-Morten Duesund wrote:
> On 2005-01-12, bingster <bdu@iastate.edu> wrote:
>
>
> Don't need to put them on a webserver - just open as a
> file:///whatever.xml
>
> And please don't top-post.
>
Sorry about top-posting. I'm not clear how file:///whatever.xml can do
what I want. The machine where those xml files are located is not a
windows machine. In that file:///whatever.xml, where should the
hostname be specified? Any online documents that tells about how
file:/// format should be used?
Bing
| |
| Dave Hinz 2005-01-19, 5:53 pm |
| On Wed, 19 Jan 2005 11:54:35 -0600, bingster <bdu@iastate.edu> wrote:
> Ole-Morten Duesund wrote:
>
> Sorry about top-posting. I'm not clear how file:///whatever.xml can do
> what I want.
What is it you want? I thought it answers your question well.
> The machine where those xml files are located is not a
> windows machine.
How is that relevant to anything?
> In that file:///whatever.xml, where should the
> hostname be specified? Any online documents that tells about how
> file:/// format should be used?
Where is the file, and where do you want to look at it? You'll either
have to share it out with some sort of file sharing, or by web sharing,
or something. What is your setup?
| |
| Ole-Morten Duesund 2005-01-19, 5:53 pm |
| On 2005-01-19, Dave Hinz <DaveHinz@spamcop.net> wrote:
<snip>
<snip>[vbcol=seagreen]
> Where is the file, and where do you want to look at it? You'll either
> have to share it out with some sort of file sharing, or by web sharing,
> or something. What is your setup?
As Dave said. What's your setup?
I can mount /archive from my server on my workstation. If I want to open
/archive/lotsostuff.xml on my workstation I can simply open mozilla, go
to the file->open menu and select /archive/lotsostuff.xml
If you're running a unix/linux thing on the server and have X11 on your
workstation then you could also run mozilla on the server and use
file->open to get to the .xml file. (That is, if you have mozilla
installed on the server)
--
Ole-Morten Duesund
My opinions are yours - oh yes, they are.
| |
| bingster 2005-01-19, 5:53 pm |
| Ole-Morten Duesund wrote:
> On 2005-01-12, bingster <bdu@iastate.edu> wrote:
>
[vbcol=seagreen]
>
>
> Since xml is just a markup language the way to present it will depend on
> what's inside it. However, there are editors and viewers available "out
> there". Personally I use firefox (or mozilla) if it doesn't know how to
> properly present an xml file, it will show you a nice collapsible tree
> view of the file.
>
> HTH
In my Firefox version 1.0 Preview Release, it shows:
XML Parsing Error: junk after document element
Location: http://host.my.edu/~user/2005-01-19.xml
Line Number 2, Column 1:
<message type='groupchat' to='room@gc.chat.my.edu'
from='room@gc.chat.my.edu'><body>foo has become available</body><x
xmlns='jabber:x:delay' from='room@gc.chat.my.edu'
stamp='20050119T13:30:00'/></message>
^
That upper arrow points to the very first '<' in front of the first word
'message'.
Bing
| |
| Bill Marcum 2005-01-19, 8:48 pm |
| On Wed, 19 Jan 2005 11:54:35 -0600, bingster
<bdu@iastate.edu> wrote:
> Ole-Morten Duesund wrote:
>
> Sorry about top-posting. I'm not clear how file:///whatever.xml can do
> what I want. The machine where those xml files are located is not a
> windows machine. In that file:///whatever.xml, where should the
> hostname be specified? Any online documents that tells about how
> file:/// format should be used?
>
I think the assumption was "you don't need to put the files on a server,
if they are on your local machine".
--
BOFH excuse #270:
Someone has messed up the kernel pointers
| |
| Ole-Morten Duesund 2005-01-20, 5:58 pm |
| On 2005-01-19, bingster <bdu@iastate.edu> wrote:
<snip>
> In my Firefox version 1.0 Preview Release, it shows:
>
> XML Parsing Error: junk after document element
> Location: http://host.my.edu/~user/2005-01-19.xml
> Line Number 2, Column 1:
>
><message type='groupchat' to='room@gc.chat.my.edu'
> from='room@gc.chat.my.edu'><body>foo has become available</body><x
> xmlns='jabber:x:delay' from='room@gc.chat.my.edu'
> stamp='20050119T13:30:00'/></message>
> ^
>
> That upper arrow points to the very first '<' in front of the first word
> 'message'.
This would indicate that your xml file is not well formed. Can't really
help you there though.
--
Ole-Morten Duesund
My opinions are yours - oh yes, they are.
|
|
|
|
|