开发者

Help me clean some ugly XML

I'm getting this XML from a service that I need to deal with. I'm not much on XML Schema or Namespace fu, but to me it looks a mess. Can someone take a look at it and tell me how to make it nicer?

http://gist.github.com/325952

I know that the namespace definitions can be declared in the first line, and not on every line. Is there anything else that can be cleaned up?开发者_如何转开发


I would say: leave the first two elements with the xsd prefix: it only occurs in the two outermost elements. In addition, declare xmlns="http://com/acmephone/ovm/cas/types" at the root and remove the typ: prefix from everything.

Edit: Actually change the xsd prefix to some other prefix; it does not matter much, but it seems to cause only confusion to use a prefix that is normally bound to the XML schema namespace.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜