XML - all its cracked up to be?

This is an honest question, no sarcasm intended.

I'm really curious, what -is- the big deal about XML?  I'm heaing all sorts 
of things such as an open standard that can be read across all platforms, 
etc.  But really, my colleagues are insisting that we transfer large chunks 
of data using XML.  There is so much overhead compared to a simple flat file 
using csv or fixed length fields.  A 10k record file is ending up being 3 
times that of what it would be if it were fixed length.  Even ini files 
still have their appeal to me over what I've seen from XML.

Maybe I'm missing something, its a serious question - what makes XML so 
appealing over fixed length files for data exchange?  Or is there?  I hope 
that both still have their place?

Thanks!

I'm interested in reading links if you want me to go elsewhere and read on 
this stuff.

;) 


0
mike8261 (6)
6/20/2005 9:43:47 PM
dotnet.xml 7266 articles. 0 followers. Follow

5 Replies
608 Views

Similar Articles

[PageSpeed] 58

> Maybe I'm missing something, its a serious question - what makes XML so
> appealing over fixed length files for data exchange?  Or is there?  I hope
> that both still have their place?
>

It's the give and take of different languages. For x-platformness, you give
in file size. Sure, XML is bloated, and you can easily create a tighter file
"spec", however, if you intend to give your message to someone else, then
they'll have to learn how you parsed it. They'll have to build their own
parser, their own validator, their own means of transformation, etc. With
XML, all of this is already taken care of.

So, XML has some great uses, but also it's *not* meant for everything. One
particular area is in large messages. Once your messages reach megabytes in
size, you'd better make sure you know how to handle such large loads, using
streaming technologies instead of objects, etc. Otherwise, your systems will
crumble. It's doable, but usually not advisable since most aren't very
familiar with how to handle such large memory.

XML's best home so far has been the web. This is partially due to XSLT, and
how easy it is to create an HTML page from an XML document, and keep your
data and presentation separated. However, XML is also finding a home among
many B2B and A2A systems, especially in small businesses and open source
projects. EDI users are starting to adopt XML, etc. It has it's place, and
due to it's ease-of-use, it's spreading to many other areas.

Bryce K. Nielsen
SysOnyx, Inc. (www.sysonyx.com)
Read the latest tutorial for xmlLinguist, the Text-to-XML Translator
http://www.sysonyx.com/xml-to-edi-850


0
bryce4830 (4)
6/20/2005 10:52:30 PM
Bryce,

Thanks for the feedback.  Your clarification was everything I needed to hear 
to help this all make more sense.  Primarily, your stating that XML isn't 
for everything, for all data transfers, was good to finally hear too.

Thanks for the reply,

-Mike


"Bryce K. Nielsen" <bryce@sysonyx.com> wrote in message 
news:etMe8qedFHA.3864@TK2MSFTNGP10.phx.gbl...
>> Maybe I'm missing something, its a serious question - what makes XML so
>> appealing over fixed length files for data exchange?  Or is there?  I 
>> hope
>> that both still have their place?
>>
>
> It's the give and take of different languages. For x-platformness, you 
> give
> in file size. Sure, XML is bloated, and you can easily create a tighter 
> file
> "spec", however, if you intend to give your message to someone else, then
> they'll have to learn how you parsed it. They'll have to build their own
> parser, their own validator, their own means of transformation, etc. With
> XML, all of this is already taken care of.
>
> So, XML has some great uses, but also it's *not* meant for everything. One
> particular area is in large messages. Once your messages reach megabytes 
> in
> size, you'd better make sure you know how to handle such large loads, 
> using
> streaming technologies instead of objects, etc. Otherwise, your systems 
> will
> crumble. It's doable, but usually not advisable since most aren't very
> familiar with how to handle such large memory.
>
> XML's best home so far has been the web. This is partially due to XSLT, 
> and
> how easy it is to create an HTML page from an XML document, and keep your
> data and presentation separated. However, XML is also finding a home among
> many B2B and A2A systems, especially in small businesses and open source
> projects. EDI users are starting to adopt XML, etc. It has it's place, and
> due to it's ease-of-use, it's spreading to many other areas.
>
> Bryce K. Nielsen
> SysOnyx, Inc. (www.sysonyx.com)
> Read the latest tutorial for xmlLinguist, the Text-to-XML Translator
> http://www.sysonyx.com/xml-to-edi-850
>
> 


0
mike8261 (6)
6/21/2005 4:09:11 AM
> Thanks for the feedback.  Your clarification was everything I needed to
hear
> to help this all make more sense.  Primarily, your stating that XML isn't
> for everything, for all data transfers, was good to finally hear too.
>

You'll find that users of XML are a lot like other programming language
users. You have your zealots who think it's useful for everything, you have
your anti-XML who don't want to even touch it, and then you have your
realists, who understand there are good and bad to everything. I tend to
have this same discussion about web servers (IIS vs. Apache), programming
languages (Delphi vs. C# vs. VB), web languages (PHP vs. ASP), and even
databases (Oracle vs. MS SQL vs. Access). A lot of us recognize that each
language has it's stengths and weaknesses. The key is to see what your task
is, *then* pick the solution whose strengths zero in on that task.

Bryce K. Nielsen
SysOnyx, Inc. (www.sysonyx.com)
Read the genesis of xmlDraft, the Smart XSD Editor
http://www.sysonyx.com/xml-schema-editor


0
bryce4830 (4)
6/21/2005 8:47:20 PM
Bryce K. Nielsen wrote:
>>to help this all make more sense.  Primarily, your stating that XML isn't
>>for everything, for all data transfers, was good to finally hear too.
> 
> You'll find that users of XML are a lot like other programming language
> users. You have your zealots who think it's useful for everything, you have
> your anti-XML who don't want to even touch it, and then you have your
> realists, who understand there are good and bad to everything. I tend to
> have this same discussion about web servers (IIS vs. Apache), programming
> languages (Delphi vs. C# vs. VB), web languages (PHP vs. ASP), and even
> databases (Oracle vs. MS SQL vs. Access). A lot of us recognize that each
> language has it's stengths and weaknesses. The key is to see what your task
> is, *then* pick the solution whose strengths zero in on that task.

But there's a difference. You can do everything with C#, VB and Delphi, 
sometimes it is harder, sometimes not. But there are some Scenarios 
where XML just fails, for example when you don't have just a tree-like 
structure.

I'd rather compare it to RSS: some people force RSS to do things it had 
never been developed for, they save and exchange everything as RSS, just 
because RSS is trendy this time.

--
Pascal Schmitt
0
6/25/2005 6:20:18 PM
> But there's a difference. You can do everything with C#, VB and Delphi,
> sometimes it is harder, sometimes not. But there are some Scenarios
> where XML just fails, for example when you don't have just a tree-like
> structure.
>

I'll conceed that point. For XML to really be useful, your data needs to
have inherintly a hierarchical structure. One thing I hate seeing is an XML
document that has a ton of disparate data, like if you took a whole database
and dumped it into *one* XML file. At least separate into appropriate
domains...

-BKN


0
bryce4830 (4)
6/27/2005 9:30:01 AM
Reply:

Similar Artilces:

Hwo to handle empty fields in XML
The following XML has an empty <UserDefinedTag /> (first record) My VB.NET app got stuck here because I don't know how to handle it. It works fine with a vlid user defined tag (next record) <UserDefinedTag>40320121</UserDefinedTag> Your help is greatly apprecited!! Bill - <JACOData> - <Inventorys> - <Inventory Type="Physical"> <Product>Dyed Diesel</Product> <TankNumber>15008230383-1</TankNumber> <UserDefinedTag /> <DateTime>1/14/2007 1:00:49 PM</DateTime> <Volume>308.122</Vo...

Sorting an XML document.
I have a slightly different sorting question than has been proposed before. My docuement looks like: <Records> <Record> <Sequence>5</Sequence> <Name>E</Name> </Record> <Record> <Sequence>1</Sequence> <Name>A</Name> </Record> <Record> <Sequence>4</Sequence> <Name>D</Name> </Record> <Record> <Sequence>2</Sequence> <Name>B</Name> </Record> <Record> <Sequence>3</Sequence> &...

XML / parent with multiple children and with multiple children
Hi, Trying to build a spreadsheet to comply with XSD supplied by UK financial regulator. Get error - A mapped element's relationship with other elements cannot be preserved. The XSD contain a header section with multiple selling agents and each selling agent can have multiple sale details. I have tried various combinations but always end up with same error message. Thanks, Richard ...

reading an xml file problem
Hi I have an app that uses xpath to read an xml document. The problem is a 70meg file uses 1.5 gig of memory. What I really need is to read only chunks of the file at a given time and cannot afford the overhead of reading in 1.5 gig of memory. A simplified example would be an xml file of 100 rows that I wanted to return random chunks of records without reading in all 100 rows each time. I would have a row number and a set number of rows to return. Any help to solve this would be great. Robin adhag wrote: > I have an app that uses xpath to read an xml document. The problem ...

XML validation #2
Hi all I have a xsd schema and some xml input structures, I want to validate them with xsd schema, how to do it. with best regards Viorel Ghilas ...

xml edit #2
I am trying to edit an xml receipt in notepad..whenever I try to save I can't save as a xml file ..it wants to save as a text file..How can I save as a xml file? -- billr You can just change the extension manually after you save it. Example - File saves as "report.txt" Rename it to "report.xml" and that's all there is to it. Billr, Try doing a Ctrl+S to save it. It should save it as the name it opened. Are you using a Notepad replacement program? Help | About | should say "Microsoft Notepad" -- * Get Secure! - www.microsoft.com/security Yo...

XML without formatting
Excel 2000 provides a nice way to edit XML. However, the problem is that is adds all of this Microsoft formatting stuff (kind of like it does with html). I can open an XML document in Excel make no changes and save it, and the resulting file will be unreadable by the application it came from. I've tried this with 2 different apps. Is there any way to save an XML document in Excel without all of the Microsoft formatting? i would reccomend using the latest version for XML XML is a disease; but so is XLS so I think that maybe it would be a good match ...

formatting xml document dynamically
Hello All, I have an asp.net search application that brings up a datagrid of results, with one of the fields being a hyperlink to an XML document, of which there are thousands. By clicking this link, the browser loads the XML document in its raw form. My question is, how do I use some of these formatting techniques (XSL etc) to format this XML the way I want to, after the link is clicked on? A nudge in the right direction would be appreciated, as I can't seem to find any example of what I am doing. Thanks Miki HI Miki, You should be able to use the XslTransform class. Below is an ex...

ANN: CAX Caching Api for Xml
Beta version is available for CAX, a caching API for XML. CAX extends the functionality of the .NET XmlReader, which is a fast XML pull parser. CAX buffers and caches XML as it is parsed and provides a cursor to all previously parsed XML. CursorMoveToParent and CursorMoveToRoot are two of the eighteen cursor methods. The Path property gives the full path of the currently parsed node. CAX works with xml documents of unlimited size and uses very little memory. CAX may be downloaded from the company website: http://www.xponentsoftware.com/cax.aspx ...

XML + XSD ----> SQL Server CE
Hi; I'm trying to load a XML + XSD into a SQL Server CE by using .NET CF. I can load XML and XSD into a Dataset in the PDA doing http://samples.gotdotnet.com/quickstart/compactframework/ ADO.NET Data Binding with XML How can I load this dataset into SQL Server CE ? Can SQL server CE Load data from XML + XSD ? Thanks; Jorge ...

Indenting XML in a string
Sorry if this seems like a newbie question, because I *am* rather new to XML I have a string with XML content string s = "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?><Service xmlns=\"uri://sumthing\">.........</Service>"; where '.....' is some more xml content When printing this string to an ASPX page, I need the output to be properly indented, presentable. I researched on Google a bit, saw something about XMLTextWriter having a Formatting property which can be set to 'Indented', but I don't know how to implem...

XML document including another
Howdy, I want to have, schematically: MasterDocument.xml: <?xml...> <tags here> <include "doc1.xml" /> <include "doc2.xml" /> </tags> Is there any way I can use XmlTextReader to parse this? Or has anyone made a suitable derived class? Upon hitting include, when I Read() I want to move to the first node in docN.xml pete_griffint@hotmail.com wrote: > Howdy, > I want to have, schematically: > > MasterDocument.xml: > <?xml...> > <tags here> > <include "doc1.xml" /> > <include "doc2.x...

XML in Worksheet w/o Looping
I am looking to find a way to insert the data from an XML file without having to loop. Just seeing if it's possible. The code I have is going to read an XML file that has the same headers as a worksheet in Excel. I use the code below to pull the XML file into a DOMDocument, then into a ADO Recordset object. When I generate an XML file, I can just query the worksheet and get a recordset, no looping needed. Why can't I do it backwards. I want to do an insert SQL statement or combine 2 recordsets or something else. as the data can get really long. Thanks for any help! ...

use XmlReader/XmlWriter to reformat XML?
Since XmlWriter offers so many nice options for formatting, I thought it would be nice to read in via XmlReader, and write back out via XmlWriter. It might be overkill, but I'd also like to be able to check some values during that time also so I was going to be using XmlReader anyway. Unfortunately I don't see an easy way to stream it back out through XmlWriter without going node by node. Any suggestions? Is there an easier/faster way to do this already? Michael Michael Malinak wrote: > Since XmlWriter offers so many nice options for formatting, I thought it > would ...

XML Structure
Hi how to create dataset to save xml relational structure to file? Programming language is vb.net This is what i get now out <?xml version="1.0" standalone="yes"?> <NewDataSet> <HEADER> <HEADERID>1</HEADERID> </HEADER> <ROW> <ROWID>1</ROWID> <HEADERID>1</HEADERID> </ROW> <ROW> <ROWID>2</ROWID> <HEADERID>1</HEADERID> </ROW> </NewDataSet> It shoud be.. <?xml version="1.0" standalone="yes"?> <NewDataSet> &...

Escaping linebreaks in XML within XSLT ??
I have a xslt that writes a txt file from xml. Xml file is generated by a user input on a webpage and some nodes have linebreaks which corrupts my output. is there a way to generally set that xslt should ignore linebreaks or a way to use <xsl:value-of select="$VALUE"/> and clear $VALUE of linebreaks or replace them with spaces?? Thanks alot! Best regards, Peter. * peter wrote in microsoft.public.dotnet.xml: >I have a xslt that writes a txt file from xml. Xml file is generated by >a user input on a webpage and some nodes have linebreaks which corrupts >my output. is...

ignoring tags in xml, using just the text
I would like to create an htm file (using Word) that will have some free form text. However, in the free form text I would like to be able to embed some fields like Name, Address, etc. I have tried to embed the fields surrounded by different characters such as __Name__, @@Name@@, $$Name$$. the problem that i am encountering is that when the htm page is displayed in IE or in Word the text looks correct.. However, when inspecting the html/xml code in notepad, the text looks like __<span class=SpellE>Name</span>__ therefore i cannot use a method like string.replace to replace th...

[ANN]VTD-XML 2.1
This is a multi-part message in MIME format. ------=_NextPart_000_00DE_01C7B199.A236C700 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable VTD-XML 2.1 is released. This version contains a number of features and = bug fixes.=20 * The BookMark class is introduced into all available plaforms of = VTD-XML.=20 * C# and Java port of VTD-XML fix the bug of unicode chars in XPath = expression. * C version of VTD-XML has numerous code clean-ups.=20 Downloads available at http://sourceforge.net/project/showfiles.php?group_id=3D110612 ------=_NextPa...

How to prevent line breaks in XML file?
I am creating XML from SQL2000 using a vb.net page, then posting it to a remote server as a string. The remote server requires that the xml contain no line breaks, but there are some ntext fields in the database that contain long text with line breaks. How do I get rid of the line breaks? Can I do this with the XmlTextWriter, or do I need to handle each affected field seperately before handing it to the XmlTextWriter? Thanks Leslie les wrote: > How do I get rid of the line breaks? Can I do this with the > XmlTextWriter, or do I need to handle each affected field seperately > bef...

Xml Schema validations and namespaces...
There's an XML message I have, that has no namespace information. Then there is a XSD schema that is must validate against, but this has a targetNamespace and xmlns of "http://www.wbf.org/xml/b2mml-v02". How do I get this XML to validate against the Schema in C#? If I use XmlSpy (2005 home edition) to perform the validation, it first inserts namespace and schema information into the XML before validating. Validation then seems to work if I take this modified XML and push it through my code, only problem is none of my XSL mappings now work because they don't include any...

Create XML From access, Fill SQL 2000 Table
Are there .NET commands to create a new table from an XML Schema. I want to create a program which converts an access table to SQL 2000 using XML. Regards ...

XML merging
This is a multi-part message in MIME format. ------=_NextPart_000_014E_01C6998C.63366C20 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi All, I am looking for XML merging for the following scenarios. I want to = load both the input files and show in the tree viewer and highlight the = differences. Now its up to the user to select the correct node. Any non = conflicting differences should be automatically merge onto the merge = document. Any suggestion/caveats on how to do this in VB.Net? Regards Sanjib doc1.xml ...

Importing XML files
Is it possible to import multiple XML files into Excel all at the same time? ...

XML for dummy's
Hi, Does anybody know some good articles that explain the use of XML, how to builmd a string in XML-strucutre etc? The 'rules' of XML etc etc? Thanks :-) Pieter Hi You can always start with : http://www.w3schools.com good basis for lots of internet related technologies. I hope it helps "DraguVaso" <pietercoucke@hotmail.com> wrote in message news:<#V8uyLK9DHA.400@tk2msftngp13.phx.gbl>... > Hi, > > Does anybody know some good articles that explain the use of XML, how to > builmd a string in XML-strucutre etc? The 'rules' of XML etc ...

XML to DataSet please help with selection
I have a two xml files schema is identical. When I read file into dataset and then bind dataset to the form. These are weather files we are getting from weather service. One file has only local weather so I don't have any problems with that, but other has weather for several different locations. Basically I need to select only weather for location if I know its code. I should have exactly same dataset so I will be able bind it to the same form without recoding. I was trying to use dataview, but dataview works only with one table and doesn't produce dataset. I got it working by ...