Sponsored Content
Top Forums UNIX for Beginners Questions & Answers General Purpose XML Processing Post 303026310 by bakunin on Saturday 24th of November 2018 02:46:05 AM
Old 11-24-2018
Quote:
Originally Posted by rahuldaso
what is the main difference beetween html and xml?
XML is the principle of using markup - "tags" - to denote special parts of a text put into a standardised format: tags are denoted "<tagname>", etc.. (there would be other ways of marking up text, like:

Code:
This is normal text [italic=on]but[italic=off] the last word was different.

which is also using the markup-principle but is not XML.)

HTML is one very specific variety of XML, with a fixed set of tags that can occur and a fixed order of tags that have to be there:

Code:
<body>....</body>
<head>....</head>

would be an error in HTML because the head-tag has to come before the body-tag. In XML this would be perfectly OK because there is no such rule. In fact there is no list of tags which are allowed and no prescribed structure they are allowed to have like there is in HTML.

So, in short: every HTML text is a valid XML text too, but not every XML has to be calid HTML.

I hope this helps.

bakunin
 

7 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Looking for a general purpose System Monitor

Does anyone have any scripts or suggestions on a general purpose Unix/Linux monitoring tool? (5 Replies)
Discussion started by: darthur
5 Replies

2. Shell Programming and Scripting

need help on xml processing

I am trying to divide a xml file(my.xml) like this: <?xml version="1.0" encoding="UTF-8"?> <Proto PName="hmmmmmmm"> <Menu id="A" ver="1"> <P> <P name="AA" Type="X"/> <P name="BB" Type="Y"/> <P name="CC" Type="Z"/> </P> ... (4 Replies)
Discussion started by: demoprog
4 Replies

3. Shell Programming and Scripting

CSV processing to XML

Hi, i am really fresh with shell scripting and programming, i have an issue i am not able to solve to populate data on my server for Cisco IP phones. I have CSV file within the following format: ;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;... (9 Replies)
Discussion started by: angel2008
9 Replies

4. Programming

help me with perl script xml processing

Hi everyone, I have Xml files in a folder, I need to extract some attribute values form xml files and store in a hash. My xml file look like this. <?xml version="1.0" encoding="UTF-8"?> <Servicelist xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"... (0 Replies)
Discussion started by: pavani reddy
0 Replies

5. Shell Programming and Scripting

Help with XML file processing

I need to get all session_ID 's for product="D-0002" from a XML file: Sample input: <session session_ID="6411206" create_date="2012-04-10-10.22.13.000000"> <marketing_info> <program_id>D4AWFU</program_id> <subchannel_id>abc</subchannel_id> </marketing_info> ... (1 Reply)
Discussion started by: karumudi7
1 Replies

6. Shell Programming and Scripting

processing xml with awk

With the following input sample extracted from a xml file <rel ver="123"> <mod name="on"> <node env="ac" env="1"> <ins ip="10.192.0.1"/> <ins ip="10.192.0.2"/> ... (1 Reply)
Discussion started by: cabrao
1 Replies

7. UNIX for Beginners Questions & Answers

General Purpose Date Script

There must be thousands of one-off solutions scattered around this forum. GNU Date is so handy because it's general but if they're asking they probably don't have it. We have some nice scripts but they tend to need dates formatted in a very particular way. This is a rough approximation which... (18 Replies)
Discussion started by: Corona688
18 Replies
MKDoc::XML(3pm) 					User Contributed Perl Documentation					   MKDoc::XML(3pm)

NAME
MKDoc::XML - The MKDoc XML Toolkit SYNOPSIS
This is an article, not a module. SUMMARY
MKDoc is a web content management system written in Perl which focuses on standards compliance, accessiblity and usability issues, and multi-lingual websites. At MKDoc Ltd we have decided to gradually break up our existing commercial software into a collection of completely independent, well- documented, well-tested open-source CPAN modules. Ultimately we want MKDoc code to be a coherent collection of module distributions, yet each distribution should be usable and useful in itself. MKDoc::XML is part of this effort. You could help us and turn some of MKDoc's code into a CPAN module. You can take a look at the existing code at http://download.mkdoc.org/. If you are interested in some functionality which you would like to see as a standalone CPAN module, send an email to <mkdoc-modules@lists.webarch.co.uk>. DISCLAIMER
MKDoc::XML is a low level XML library. MKDoc::XML::* modules do not make sure your XML is well-formed. MKDoc::XML::* modules can be used to work with somehow broken XML. MKDoc::XML::* modules should not be used as high-level parsers with general purpose XML unless you know what you're doing. WHAT'S IN THE BOX XML tokenizer MKDoc::XML::Tokenizer splits your XML / XHTML files into a list of MKDoc::XML::Token objects using a single regex. XML tree builder MKDoc::XML::TreeBuilder sits on top of MKDoc::XML::Tokenizer and builds parsed trees out of your XML / XHTML data. XML stripper MKDoc::XML::Stripper objects removes unwanted markup from your XML / HTML data. Useful to remove all those nasty presentational tags or 'style' attributes from your XHTML data for example. XML tagger MKDoc::XML::Tagger module matches expressions in XML / XHTML documents and tag them appropriately. For example, you could automatically hyperlink certain glossary words or add <abbr> tags based on a dictionary of abbreviations and acronyms. XML entity decoder MKDoc::XML::Decode is a pluggable, configurable entity expander module which currently supports html entities, numerical entities and basic xml entities. XML entity encoder MKDoc::XML::Encode does the exact reverse operation as MKDoc::XML::Decode. XML Dumper MKDoc::XML::Dumper serializes arbitrarily complex perl structures into XML strings. It is also able of doing the reverse operation, i.e. deserializing an XML string into a perl structure. AUTHOR
Copyright 2003 - MKDoc Holdings Ltd. Author: Jean-Michel Hiver This module is free software and is distributed under the same license as Perl itself. Use it at your own risk. SEE ALSO
Petal: http://search.cpan.org/dist/Petal/ MKDoc: http://www.mkdoc.com/ Help us open-source MKDoc. Join the mkdoc-modules mailing list: mkdoc-modules@lists.webarch.co.uk perl v5.10.1 2005-03-10 MKDoc::XML(3pm)
All times are GMT -4. The time now is 11:35 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy