You are here: Re: I have DOM angst « PHP Programming Language « IT news, forums, messages
Re: I have DOM angst

Posted by Tony Marston on 09/07/06 18:49

I don't need to manipulate the contents of XML files so I cannot give advice
on the best tool to use. I can only repeat that if you want to change data
at all then XML is not the best format by a long chalk. That is what
relational databases are for. XML is a data *interchange* format, not a data
*storage* format, certainly not for data that is liable to be modified. You
can store XML fragments in your database if you like, but if you want to
manipulate the contents of any of those fragments you will not find it a
easy as modifying an ordinary database table.

--
Tony Marston
http://www.tonymarston.net
http://www.radicore.org

<ReGenesis0@aol.com> wrote in message
news:1157637357.640168.195680@i3g2000cwc.googlegroups.com...
> Tony Marston wrote:
>
>> The tools for manipulating XML are supposed to be better in PHP 5 than
>> PHP
>> 4, but the whole pointof XML is *not* to be manipulated, simply written
>> by
>> one process and read by another process. It is used to exchange data
>> between
>> different processes, not to provide a storage mechanism as a replacement
>> to
>> an SQL database.
>
> See, I'd be a crumudgen and say- "The point of XML is to store your
> date IN and XML string in a field in a sql database. Certain key
> values like a date and ID will remain as seperate db-fields, but for
> the MSOT part, it's a lump of xml code."
> The advantage here, if you want to change the type of date you're
> storing, or if the type just varies a lot, (say if you have 16
> different types of content_types all with different sub-fields you want
> to sore in the same database) You dont' have to go back and re-work
> your databse queries. It's a standard query. "Go and get the xml code
> nugget, chuck it bodily at a xsl sheet. The XSL stylesheet will treat
> it appropriately based on the content_type attribute in the base tag."
>
> Searchability/queryabnility goes all the hell udner this system, but
> flexability and expandability goes way, way up. It's inappropriate for
> some applications, but very appropriae for many others.
> But, this presupposes the ability to manipulate complicated nested xml
> files, (largely from a form handling standpoint.)
>
> (Storing XML in a text field sounds back-assward, but I've seen this
> basis system in action on a proprietary internal system, it works very,
> very well, and I WANT that level of flexability.)
>
> Some meditation on the issues involved has me thinkign that basically
> what I need is a simpler way of manipulating things in memory.
>
> I'd been avoiding simpleXML in favor od DOM-based solutions on the
> premsie that DOM is the better/'correct' way of doign things, but the
> more I look, it seems like the itneroperability of dom/simpleXML simly
> BEGS for me to manipulate thing in simplexml, and then just conver them
> back for xsl interpretation.
> (I'd been thinking of simple XML as a seperate 'dumbed-down'
> implemantation, but it starting to look more sideways of DOM, liek
> theyr'e seperate tools meant to be used together for their strengths.)
>
> IS SimpleXML what I'm looking for? (Basically, I'm giving you an
> opportunity to say something bad about it.)
>
> -Derik
>

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация