开发者

What is the significance of POX ("plain old XML")?

I've seen some references recently to POX or "plain o开发者_StackOverflowld XML". Is there a movement to simplify XML use?

Wikipedia says:

People typically use the term [POX] as a contrast with complicated, multilayered XML specifications like those for web services or RDF.

Personally I find some of the usage of XML schemas and DTDs overly complex so I would welcome simplifying XML usage. But maybe that's just me.


Not really. The fact is that some people (rightfully) don't want to dig into the XML/XPath/Schema/RDF/RDF-XML/OWL and whatnot, and they are happy writing

<MyStuff>
   <Foo>bar</Foo>
</MyStuff>

All the specs of XML and related world does not scale to the single developer level. Hence the POX, JSON and all the low-fat stuff you see around.

Of course, if you have a huge enterprise with thousands of people employed, things are different, but... it's the matter between a transatlantic and a punt. You would never go through the ocean with a punt, and all by yourself cannot pilot a transatlantic.


I for one love POX and avoid complicated schemas wherever I can.


It depends on your needs. If it will be only you that will have to manipulate the xml, it's perfectly suitable to use POX. But in cases where other developers, or even companies will have to manipulate your XML, then using schemas is madnatory. Not to mention to xsd-to-java (or xsd-to-C#/Php/Ruby/etc. ?) tools. Imagine it like that - XSD is the Class, and an xml is an instance of that class. The class defines an explicit contract. And most often such an explicit contract is required.

I generally prefer generating schemas from class files (Java in my case), so that your object model is in the center of 'everything'.


I have to work with complicated schemas on a semi-daily basis. I't frustrating and most of them has a steep learning curve. Once you get passed a certain level, they become very flexible but they do not get any easier.

I never write complex schemas, although i do write schemas. Simplicity is my preferred way.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜