(Jimmy Zhang) The easiest most and most efficient way to update XML documents is to use non-extractive parsers (such as VTD-XML) because they support incremental content update. Suppose you have the following XML document, named test.xml. Below is a snippet that inserts two attribute name/value pair
Tag: JSON / JAVA / XML
Subtyping in W3C XML Schema, Part 1
(Jack Lindsey) In 2001, the long-awaited W3C XML Schema language (XSD) introduced a typing system as a fundamental principle of its design. This is much more than just strong data types like dates and decimals, which XSD calls simple types – although it certainly has an embarrassment of riches in th
XSLT Q&A: Refactoring templates
(Jeni Tennison) A question about how to refactor some repetitive templates. The issue is in creating XHTML headings.
Using Syndication Classes to Read RSS Feeds
(Bipin Joshi) RSS and ATOM feeds dominate the syndication systems today. If you run a web site you probably use RSS and ATOM for two purposes: –Expose your site content for syndication using these formats –Consume content exposed by other web sites and aggregate it on your web site
File System Access in XSLT
(Erik Wilde) XSLT 2.0 introduces the unparsed-text() function, which allows XSLT programs to read text documents. this is very useful, because it allows access to non-XML information from within XSLT. and in conjunction with XSLT 2.0’s largely improved capabilities for text processing, it allows eas
Why REST, WS-* and technology are the problem, not the solution
(Steve Jones) I’ve said it before and I’ll say it again… SOAP v REST is more pointless than vi v emacs. Building on the previous post and in reference to an article at InfoQ I’m really beginning to feel that IT, and most especially the software part, has some form of terrorist organisation going w
Apply an Identical Transformation to a DOM Tree Using TrAX
(Leonard Anghel) To test your TrAX application without involving your live business processes, simply build an identical transformation. You can do this using the newTransformer() method—without any arguments. The following code is a full example that applies an identical transformation to a DOM tre
Simple SVG chart generation with XSLT
(Florent Georges) This week, for my job, I have to create a report generator for a financial company. The reports must be in PDF, so I naturally decided to use XSL-FO. Among other things, the reports contain graphical charts with, you know, financial stuff. The client wants its developers to be able
Parsing xml in Flex – The case of tag names with a dash
(Cesare Rocchi) I am a fan of json. I use it extensively but sometimes I am forced to use xml. A pretty well know way to parse xml in Flex and Adobe air is the following: var xml:XML = new XML(“content”);
Data binding with Castor, Part 4: Bind your Java objects to SQL databases
(Brett D. McLaughlin, Sr.) You’ve already seen how flexible Castor is in allowing you to convert Java objects to XML and back. But Castor does a lot more, including letting you take those same Java objects and turn them into rows within your SQL database. Learn what syntax is the same, what’s differ
