Pros and Cons of programming languages for XML & string manipulation
I don't mean this to be opinionated.
What are serious pros/cons of various server-side languages in regards to creating/modifying xml. I'm currently resear开发者_JS百科ching new platform/language direction and we deal with a lot of xml.
We also do a lot of string manipulation, what advantages/disadvantages do different languages have in regards to string manipulation. I'm thinking along the lines of regular expression searching and replacing.
As far as XML goes, no language really has an edge. There are multiple libraries for pretty much every language out there, and lots have LibXML bindings.
For string manipulation, Perl might have an edge as it has very convenient regular expression syntax along with handy methods such as tr
and lc
… but that could just be my Perl bias showing through.
In the end — go with the languages you are familiar with.
You might check out VB.NETs XML Literal functionality
http://msdn.microsoft.com/en-us/library/ms364068(VS.80).aspx#vb9overview_topic6
You may want to check out Scala. It has built in support for XML literals and also good regex support.
Examples:
http://ikaisays.com/2009/04/04/using-pattern-matching-with-regular-expressions-in-scala/
http://joeygibson.com/2009/09/24/im-liking-scalas-xml-literals/
If you have enterprise dollars, Tibco BusinessWorks works really good for handling XML also with GUI xpath expressions and xml to its core.
I'm sure an argument can be made for almost any language. It may come down to what language you are comfortable with and can easily find skilled developers for.
You should definitely consider The Extensible Stylesheet Language Family (XSL). This language is specifically designed to manipulate XML. You can use regular expression in XSL via <xsl:analyze-string select="" regex="">
.
精彩评论