Filter by products, topics, and types of content

(0 Products)

(102 Topics)

(13 Industries)

(6 Types)

1 - 100 of 109 results | Next
Show Summaries | Hide Summaries
View Results
Title none Type none Date none
Tip: Data scoring: Convert data with XQuery
The process of converting data is one of migrating information from an unsuitable source or format to a suitable one -- often not an exact science. Data scoring is a way to measure the accuracy of your conversion. Discover a simple scoring technique in XQuery that you can apply to the result of a small text-to-XML conversion.
Also available in: Russian   Japanese  
Articles 29 Sep 2009
XForms tip: Using the incremental attribute to detect keystrokes
One of the slickest application genres are those that update data as you type. XForms does this with finesse! Controls have the ability to send events after each keystroke entered within them using the incremental attribute. That way controls that need to change their data based on the data of a control that's changing incrementally can also update their data incrementally, effectively keeping what's viewed "on screen" in sync across the board. This tip shows you how to make the most of the incremental feature with sample XForms code.
Articles 06 Feb 2007
XForms tip: Enabling cross-domain loading and sending in Firefox
XForms with Firefox has a built-in security feature that inhibits users from "cross-domain" loading and sending of instance data. Just like pop-ups, you don't want this to happen by default unless you trust the Web site. You shouldn't have to worry about it since this security feature is on by default, but sometimes you'll want to be able to perform cross-domain loading and sending of instance data with certain Web sites. This tip will show you how.
Also available in: Japanese  
Articles 23 Jan 2007
XForms tip: Dynamically create controls with the repeat, select1, and itemset elements
Forms can have lists of data, which are difficult to display using regular HTML forms. The select1 and itemset elements have a lot of flexibility and are very similar to the select or option tags in HTML. The repeat element really shows its power here in that you can have a list of lists of data, and so on. You'll see how slick it is to populate the data used by the forms using XML. Once you use these XForms controls and populate them using XML, you'll never want to go back to using HTML ever again!
Articles 09 Jan 2007
XForms tip: Using calculations
Part of the allure of XForms is the fact that it provides more of an opportunity to provide interactivity than regular HTML forms, or at least it provides an opportunity to provide that interactivity with much less hassle. One function that's fairly common in Web forms is the ability to perform a calculation based on data supplied by the user. In a traditional HTML form, this means creating a JavaScript script and checking for specific actions such as the user clicking on a button or leaving a particular field. Any of these actions can be prone to error based on different browser versions or rendering of the form in a nontraditional browser. Fortunately, XForms solves this problem by providing a standard way to include calculations in the functionality of your form.
Articles 02 Jan 2007
XForms tip: Uploading files using XForms
Forms are typically used to request simple, individual pieces of information, such as names and phone numbers, from users. Frequently, however, you need to be able to request that the user send some sort of file along with the submission. This tip shows you how to use the XForms upload element to achieve this.
Articles 23 Oct 2006
XForms tip: Sending XForms data using e-mail
Part of the value of forms is their ability to send information where you need it. In the case of Web forms, that destination is normally a Web server that analyzes the right data. But what if you want to send the information using e-mail? In XForms, you have two options for accomplishing this feat; one on the server side, and one on the client side. This tip shows you how to e-mail XForms data from PHP, and also directly from the browser.
Also available in: Chinese  
Articles 17 Oct 2006
Tip: How not to design an XML format
This tip investigates an XML format that demonstrates a number of common mistakes and design flaws, and explains how you can correct these issues and improve the format.
Articles 04 Nov 2005
Web services tip: Use polymorphism as an alternative to xsd:choice
xsd:choice is not always the most optimal XML schema construct. For instance, a type containing xsd:choice does not map to a user-friendly Java class using a JAX-RPC code generator. In this article, you learn about a functional equivalent to xsd:choice: polymorphism.
Articles 20 Sep 2005
XForms tip: Accepting XForms data in Perl
The Perl programming language is widely used on the Internet, and it will continue to be popular for quite some time. It's considered an easy language to program in because it handles strings very well. Also, what you can do in a few lines in Perl takes many more lines of code in other programming languages. In this tip, you'll learn how to submit an XForms form using POST to a Perl script, and capture the data for later use.
Also available in: Japanese  
Articles 03 Oct 2006
Tip: Parsing XML documents partially with StAX
The Streaming API for XML (StAX) provides not only an XML parser that is fast, easy to use, and has a low memory footprint, but one that also provides a filter interface that allows programmers to hide unnecessary document detail from the application's business logic. This tip shows how to apply event filters and stream filters to StAX parsers. As with the first tip, I will demonstrate and explain this using both the iterator-style API and the cursor-based API.
Articles 02 Dec 2003
Tip: Combine and alternate xml-stylesheet processing instructions
Insert multiple xml-stylesheet processing instructions into a document's prolog in order to provide different views for different users. This tip also shows you how to include pseudo-attributes to fine tune your presentations.
Articles 22 Jul 2005
Tip: Loop with recursion in XSLT
XSLT is a functional programming language like Haskell or Scheme, and unlike C or Fortran. Thus it has no loops and no mutable variables. Instead, you must replace these constructs with recursion and parameters. This tip demonstrates how to provide this functionality using named templates and the xsl:call-template, xsl:with-param, and xsl:param elements.
Also available in: Japanese  
Articles 28 Jul 2006
Tip: Tell a parser where to find a schema
This tip shows you how to implement robust document validation with XML schema and JAXP 1.2. Examples are included for SAX and DOM parsers.
Also available in: Japanese  
Articles 22 May 2003
XForms tip: Use XForms to upload a file to Java
Uploading files is a fairly common task using HTML forms, but how do you do it in XForms, where the data gets stored as part of an XML document? This tip explains how to create an XForms form that enables the user to upload a file, and it explains how to create a Java servlet that saves the file on the server once it arrives.
Articles 05 Dec 2006
XForms tip: Saving data to local files and reusing later with XForms
Partially completing an online form, only having to leave before you've finished, can be frustrating. XForms can fix this problem. There's a quick and easy way to save the instance data of an XForm so that you can reuse it later.
Articles 17 Oct 2006
Web services tip: Representations of null in XML Schema
Represent a null value in the XML-equivalent of a field when you map a null Java bean field to XML. This tip explores and compares a number of ways to do so.
Also available in: Russian   Japanese  
Articles 09 Aug 2005
Tip: Make choices at runtime with XSLT parameters
This tip takes a basic look at using parameters and conditional statements in an XSLT style sheet.
Also available in: Japanese  
Articles 01 Aug 2002
Tip: Achieving vendor independence with SAX
While newer XML developers are learning to achieve vendor independence with JAXP, SAX veterans have been vendor neutral for years. This tip explains how to use SAX and a SAX helper class to achieve vendor independence in your SAX-based applications.
Articles 01 Mar 2001
Tip: Asynchronous SAX
Over asynchronous channels -- such as a socket that produces data over a long duration -- SAX is a wonderfully lightweight programming technique for parsing incoming messages.
Articles 14 May 2003
Tip: Make your life easier with the XML Schema Standard Type Library
XML validation enables you to create complex rules that define acceptable data. But they're no good to anybody unless you use them. In this tip, you learn to use the XML Schema Standard Type Library to simplify the process of requiring formatted data such as e-mail addresses and telephone numbers.
Also available in: Chinese  
Articles 31 Jul 2007
Tip: Computing word count in XML documents
XML is text and yet more than just text -- sometimes you want to work with just the content rather than the tags and other markup. In this tip, Uche Ogbuji demonstrates simple techniques for counting the words in XML content using XSLT with or without additional tools.
Articles 29 Sep 2005
Tip: Migrating from JBoss 4 to JBoss 5
Trying to migrate your EJB code to JBoss 5? Can't get the code to deploy and run? If so, this tip is for you. Or, are you new to JBoss 5 but you want to get a feel for the EJB 3 environment? This tip details the required XML deployment files to build, deploy, and run EJB3 code on JBoss5.
Also available in: Chinese  
Articles 21 Jul 2009
Tip: Use XSL-FO for page breaks and tables
The XSL Formatting Objects (XSL-FO) standard offers powerful properties for controlling the layout of printed documents. This tip shows you how to control the insertion of page breaks for better-looking documents. I'll present a standard method that works with commercial XSL-FO renderers, and a workaround so you can apply the same technique with the open source FOP.
Also available in: Japanese  
Articles 11 Jun 2003
Tip: How to combine documents with XSLT
This tip explains how to write XSLT style sheets that process several documents. This is useful, among other things, for combining book chapters, merging a letter template and a list of addresses, creating tables of content that span several files, or -- following the tip example -- reusing photo descriptions in different galleries.
Also available in: Japanese  
Articles 29 May 2003
Tip: Send and receive SOAP messages with JAX-RPC
In this tip, IBM developer Russell Butek takes a look at JAX-RPC, a Java API that allows an application to communicate with a Web service without knowing details about the SOAP messaging protocol.
Also available in: Japanese  
Articles 02 Sep 2003
Tip: SAX and document order
Focus on document order, SAX, and document order indices (DOIs) as Howard Katz discusses document order in an XML context. He presents simple SAX code that shows a practical application of DOIs in a search engine.
Articles 01 Jan 2003
Tip: Bring Scalable Vector Graphics to life with built-in animation elements
Scalable Vector Graphics (SVG) is an XML-based language for drawing two-dimensional graphics. Sound dull? Far from it. SVG has many exciting features available to it such as transformations, alpha masks, filter effects, and animation. This tip provides working examples to show you how to apply the five flavours of SVG animations to your SVG documents.
Also available in: Japanese  
Articles 18 Jun 2003
Tip: Transforming XHTML using XSLT identity templates
XHTML isn't just well-formed HTML: Certain tags must be properly closed. Improperly closed tags are valid XML, but browsers might incorrectly parse them, causing problems with dynamic Web 2.0 features. Whether transforming XML to XHTML or just filtering XHTML, discover the XSLT templates you need to create correct XHTML that follows W3C-recommended practices for XHTML.
Also available in: Chinese   Japanese  
Articles 21 Dec 2010
Tip: Implement XMLReader
In this tip, Benoit Marchal explores APIs for XML pipelines. He concludes that the familiar XMLReader interface is appropriate for many XML components.
Articles 13 Nov 2003
Tip: Convert attributes with XSLT
Templates are useful for breaking stylesheets into small, manageable units. Another benefit of templates is that the processor selects the most appropriate one automatically, based on the matching condition. Most templates match on elements, but as Benoit Marchal demonstrates in this tip, a template can match on attributes as well.
Also available in: Russian  
Articles 09 Oct 2003
Tip: Generating internal HTML links with XSLT
Uche Ogbuji walks you through how to use XSLT to populate HTML or XHTML output with anchors and internal links. Internal links help to organize long HTML content; XSLT provides facilities for generating those internal links, but some of the methods are somewhat obscure. This tip, with reusable sample code, clearly spells out two approaches for the process.
Also available in: Japanese  
Articles 01 Feb 2001
Tip: Convert Excel data to XML
Believe it or not, not every document is originally written in XML. In this tip, Benoit Marchal explains how to unlock data from Excel files to process them in XML, and examines the pros and cons of different solutions.
Articles 05 Nov 2003
Tip: When to use local and global declarations
W3C XML Schema offers many powerful options for structuring and organizing your XML vocabularies. In this tip, Benoit compares global and local declarations of elements, and provides pointers on when to use which.
Articles 11 Sep 2003
Tip: Paging Atom: Create a multi-section Atom collection or feed
As feeds move beyond merely announcing new content on somebody's blog and into organizing data, you can easily find situations where you don't want your feed to include all of the available data. This tip shows you how to create an Atom feed that lets users page through it using "next" and "previous" links or buttons. While the tip shows you how to implement this functionality using PHP, the concepts are the same for any programming language.
Articles 10 Apr 2007
XForms tip: Reacting to the refreshing of the form
As data changes in your XForms form it can be essential to know right away and do something with the new data, especially when your XForms get more advanced. This tip shows you how to hook such events right into JavaScript methods, thus allowing you to then use the data in many different ways.
Articles 13 Feb 2007
XForms tip: Using setvalue
XForms provides a lot of ways to set the information on a control, from instance data to bind elements and calculations. But sometimes you just want to set a value directly; this tip shows you how to use the setvalue element to do just that.
Articles 03 Jan 2007
Tip: Better SOAP interfaces with header elements
In this tip, Benoit Marchal discusses how to design modular, flexible, and extensible service interfaces with SOAP headers.
Articles 29 Oct 2003
XForms tip: Using the help and hints events
XForms enables you to easily send help messages and hint messages to a form using elements, but did you know that you can get even more control over this process by reacting to the help and hints events instead? This tip shows you how to detect when the user needs some assistance and react accordingly.
Articles 29 Nov 2006
XForms tip: Using form submission events
One of the nice things about XForms is how much control it gives you over how the form is processed. For example, XForms exposes a tremendous number of events for which you can trap and perform specific actions. In this tip, you learn how to use the events involved in submitting the form.
Articles 29 Nov 2006
XForms tip: Using multiple, hierarchical forms with XForms
Standard HTML forms are hard, if not impossible, to nest within each other. They lack the power that XForms has, because XForms uses XML. This tip shows you how to nest multiple, hierarchical forms within an XForm form.
Articles 23 Oct 2006
XForms tip: Alerts and message boxes
XForms is about collecting data, but it is also about improving the user experience. In some cases, you need to provide additional information to the user outside of the actual form. In traditional Web pages, you accomplish this through the use of alert boxes and pop-up windows. In addition to its help capabilities, XForms gives you a number of different options for providing additional information for the user. This tip explains alerts and message boxes, the difference between them, and how to use them.
Articles 17 Oct 2006
XForms tip: Dealing with dates and time with XForms
Forms often use a date to log the day that a transaction occurred. The time is also useful since it can be used to log when a job was completed, or when something was purchased. This tip shows you how to use the date and time schema types using XForms.
Articles 29 Sep 2006
XForms tip: Accepting XForms data in PHP
In some ways, an XForms form is just like an HTML form; with the proper encoding, the server-side script receiving the data won't even know the difference. But the strength of XForms forms is in many ways the fact that the data can be submitted directly as XML. Of course, this capability doesn't do you any good unless the script is prepared to receive the data. In this tip, you will see how to create a PHP script that can receive and work with XML data submitted by an XForms form.
Also available in: Russian  
Articles 26 Sep 2006
XForms tip: Using the switch/case elements
XForms are designed to provide an interactive experience, and in many cases that means showing the user different information based on different conditions. For example, you may have a form with multiple sections, but you don't want to overwhelm the user by displaying it all at once. In this tip, you will use XForms switch and case elements to display only part of a form at any given time.
Articles 22 Sep 2006
Tip: Use a SAX filter to manipulate data
This tip explains how to create and use a SAX filter to control how data is processed.
Articles 01 Oct 2002
Tip: Stop a SAX parser when you have enough data
A SAX parser can be instructed to stop midway through a document without losing the data already collected. This is one of the most commonly mentioned advantages of a SAX parser over a DOM parser, which generally creates an in-memory structure of the entire document. In this tip, you'll parse a list of recently updated weblogs, stopping when you've displayed all those within a particular time range.
Also available in: Japanese  
Articles 01 Jun 2002
Tip: Call JavaScript from an XSLT style sheet
XSLT style sheets allow you a great deal of freedom in manipulating the data in your original XML document. There are times, however, when you really want to do actual programming, and the XSLT recommendation is designed to allow that through the use of extensions. These extensions take the form of functions and elements and can be written in any language the processor supports. One of your options is to embed JavaScript within the style sheet, either directly or as an external file.
Also available in: Japanese  
Articles 01 Apr 2002
XForms tip: XForms capabilities accessible through Mozilla and CSS
XForms provides incredible flexibility in the way properties defined within the XForm are displayed and behave. To take advantage of Mozilla's CSS capabilities, pseudo elements must be accessed using Mozilla-specific pseudo classes, because although there is no current support for the pseudo elements, there is support for the pseudo classes. This tip shows gets you started by showing you how to access the Mozilla-specific CSS properties.
Articles 19 Dec 2006
XForms tip: Making a read-only control writeable
At times it is crucial to programmatically control the writability of data in your XForms. For example, if you're browsing data in read-only mode (so modifications aren't made by accident), and then you need to update or add new data, the read-only mode of the same controls will need to become writeable. This tip shows how you can change the readonly property of controls programmatically.
Articles 13 Feb 2007
Tip: Use language-specific tools for XML processing
DOM and SAX are the two best known systems for XML processing, but they are really compromises across programming languages. As such, they do not take advantage of any language's particular strengths. Often it is better to duck conventional wisdom and use special APIs that take advantage of particular strengths.
Articles 30 Jan 2004
Tip: Counting with node sets
Many common XSLT tasks, including simple loops, can be made easier by using special properties of node set operations. This tip discusses using node sets for simple and efficient loop control.
Articles 01 May 2002
Tip: Twisting XML with XSLT 2.0
The XML story has two sides: data creators and data consumers. XSL typically falls on the consumer side of the equation, and all too often the format of the data is fixed well before a template gets to it. Take a list of books, for example. You might have an XML file with a list sorted by title, but what if you want the list to be sorted by author, or you just want to display the distinct author names? Can XSL do that?
Also available in: Russian  
Articles 31 Mar 2005
Tip: Packaging XSLT lookup tables as EXSLT functions
In an earlier tip, Uche Ogbuji demonstrated how to build lookup tables in XSLT. In a follow-up tip, he covered how to handle error or default conditions for such a lookup. This tip shows how to use the functions module from EXSLT, the community standard in XSLT extensions, and how this technique further improves such lookup tables by packaging code into easily reusable functions.
Articles 24 Jan 2005
Tip: Default and error handling in XSLT lookup tables
In a previous tip, Uche Ogbuji demonstrated how to build lookup tables in XSLT. One follow-up question to emerge from that article is how to handle error or default conditions in XSLT lookup tables. This tip illustrates how to do so.
Articles 22 Dec 2004
Tip: Use Universal Feed Parser to tame RSS
RSS is supposed to be based on XML (or XML/RDF) standards. Unfortunately, the famous wild west community behind RSS has many renegade elements producing feeds that are not even well-formed XML. Mark Pilgrim's excellent Universal Feed Parser is a great tool for parsing even ill-formed feeds, and this tip demonstrates how to use it to extract feed data from RSS.
Articles 01 Oct 2004
Tip: Convert from HTML to XML with HTML Tidy
This tip demonstrates how to convert HTML documents to XML (or more specifically, XHTML) with a simple, open source tool, HTML Tidy. This conversion is useful for webmasters who are migrating to XML. It can also help XML converts who have to interface with legacy HTML tools.
Articles 18 Sep 2003
Tip: Organize content with Atom categories
Atom lets you provide an easy way to manage lots of data, but there will come a point at which you need to add some sort of categorization to make that data manageable. This tip shows you how to use categories with Atom feeds and the Atom API. Although you will naturally add category information to information syndicated using Atom, this tip focuses on these categories from the perspective of the Atom Publishing Protocol.
Also available in: Japanese  
Articles 17 Jul 2007
Tip: How to use Atom's slug header when you publish content
One advantage of the Atom Publishing Protocol is the ability to not only retrieve information, but also to add or edit information. In this tip, learn to use Atom's Slug header to influence the final URL for this information. This tip uses the Blogapps server, which supports draft 10 of the Atom Publishing Protocol 1.0 specification, but is applicable to any APP 1.0 compliant server.
Articles 05 Jun 2007
Tip: Apply profile links to microformats
Microformats are a popular way to incorporate structured data into regular Web pages. Unfortunately, using microformats without some measure of control can lead to confusion and technical problems. Learn how formal profile declarations in your documents can improve the value of your microformats.
Articles 26 Jun 2007
Tip: Debug stylesheets with xsl:message
In this tip, discover several possible ways you can use the xsl:message element to assist with understanding and debugging Extensible Stylesheet Language Transformation (XSLT) stylesheets.
Also available in: Chinese  
Articles 18 Jul 2006
Tip: Converting from JDOM
Learning to work with JDOM? Well, no API is an island, and in this tip you'll learn how to convert with ease from JDOM to SAX and DOM for fluent programming of XML applications that use all three APIs. The code samples provide examples of converting from JDOM to SAX and from JDOM to DOM.
Also available in: Japanese  
Articles 01 Apr 2001
Tip: Outputting HTML from an XSL style sheet
This tip discusses the differences between HTML and XML, and explains how to use XSLT's output element to resolve the issues they create.
Also available in: Japanese  
Articles 01 May 2002
Tip: Always use an XML declaration
The XML declaration is optional in XML files, and defaults determine most of the information in the file. However, problems are common when these defaults do not match reality -- for example, the document could use an encoding other than one of the defaults. It's always safer to make the XML declaration. In this tip, Uche Ogbuji covers what should be included in the XML declaration on all files.
Also available in: Russian  
Articles 05 Jun 2007
Tip: Output large XML documents, Part 5
In this, the last in a five-part series of tips on outputting large XML documents, Brett McLaughlin provides several practical examples of using the SAX DataWriter class to output XML.
Also available in: Japanese  
Articles 23 Apr 2003
Tip: Output large XML documents, Part 3
This tip delves further into the use of XML filters, as introduced in the previous tip. You will see several practical examples of filters, including utilities that filter out all elements, all attributes, or particular elements or attributes in an XML document. Each is provided as a reusable filter.
Also available in: Japanese  
Articles 09 Apr 2003
Tip: Using a DOM NodeFilter
This tip shows you how to create a a NodeFilter as well as a Traversal object that uses it.
Articles 01 Nov 2002
Tip: Output large XML documents, Part 2
This tip begins to detail ways to handle large XML documents. You will learn what an XMLFilter is, and how it builds upon the core SAX API to offer advanced data filtering. This is the first piece in the puzzle of handling large datasets, allowing you to extract only relevant data from an XML document for output.
Also available in: Japanese  
Articles 02 Apr 2003
Tip: Moving DOM nodes
This tip takes a look at a common exception that occurs when you attempt to move DOM nodes. Here you'll learn the causes of this exception and, most important, how to avoid it when doing DOM programming. The code listings demonstrate how to move nodes from one document to another, what the code that generates the dreaded Wrong document exception looks like, and how to write correct code that doesn't present this problem. This tip assumes that you already know the basics about how to work with the DOM."
Also available in: Japanese  
Articles 01 Mar 2001
Tip: Keep context straight in XSLT
Developers frequently forget where context changes in XPath. XSLT provides an anchor for the initial context used for XPath expressions -- the current() function. In this tip, Uche Ogbuji warns about common bugs associated with changing context, and explains how to use current(). You should be familiar with the basics of XPath and XSLT.
Articles 01 Feb 2003
Tip: Namespaces and versioning
You can use several techniques for versioning XML schemas, such as defining special root attributes or using the DTD. This tip discusses how to use XML namespaces to version formats.
Articles 01 Jun 2002
Tip: Validation and the SAX ErrorHandler interface
In this tip, Brett McLaughlin explores SAX's validation capabilities and explains how to turn XML document validation on and off. He also covers the ErrorHandler interface, which enables you to receive notification of errors in your applications and act on that notification. Code samples demonstrate how to request validation and how to create and register an error handler in SAX.
Articles 01 Jun 2001
Tip: Customize a DTD with parameter entities
Creating a Document Type Definition (DTD) and using it to validate your document is a good way to ensure that the data fits a particular structure. In some cases, however, you want to give users some control over the structure. Parameter entities enable you to create a structure that allows a document author to choose from two or more possible DTD structures without giving that person control over the actual DTD.
Articles 01 Jul 2002
Tip: Using an entity resolver
Brett McLaughlin discusses how to use external entity references to include external content in an XML document, and how to use the SAX EntityResolver interface. Code samples illustrate the interface, document its use, and demonstrate how to register the entity resolver in your parser.
Also available in: Japanese  
Articles 01 Jun 2001
Tip: Use internal references in XML vocabularies
In some cases, you can avoid repeating identical data fields by using internal references from one field to another. Uche Ogbuji demonstrates how in this tip.
Also available in: Japanese  
Articles 01 Mar 2003
Tip: Use imports and includes to override XSLT templates
Extensible Stylesheet Language Transformations (XSLT) provide two ways to combine several style sheets in the transformation of a single source document. Which template is actually applied depends on whether and how the template has been included in the main style sheet.
Articles 01 Nov 2002
Tip: Passing files to a Web service
In this tip, Benoit discusses the different solutions available for passing binary data (typically files) to a Web service.
Also available in: Russian   Japanese  
Articles 13 Feb 2004
Tip: SAX filters for flexible processing
SAX filters allow you to construct complex XML processing behaviors from simple, independent modules. In this tip, Uche Ogbuji introduces this important XML processing technique.
Articles 01 Mar 2003
Tip: Flexible DTDs with parameter entities
In this tip, Brett defines parameter entities and shows you how they're used. You will learn how to construct parameter entities and use them in your XML DTDs.
Articles 01 Jan 2003
Tip: Set up a SAX ContentHandler
This tip details the process of creating a SAX ContentHandler, the construct that handles user-defined logic in SAX parsing. You will understand the SAX package structure, see its relation to the SAX ContentHandler class, and get a handle on callback methods and their use in SAX parsing.
Articles 22 Jul 2003
Tip: Use XML directly over HTTP for Web services (where appropriate)
SOAP technologies usually exchange XML over HTTP, but SOAP has its pros and cons, and a lot of discussion has focused on how to use XML more directly to communicate between applications. This tip describes the direct approach, and discusses where it is most appropriate. It also discusses how to use WSDL to describe such services.
Articles 15 Jan 2004
Tip: Traversing an XML document with a TreeWalker
This tip demonstrates the process of determining whether TreeWalkers are available and using them to extract information from a document.
Also available in: Japanese  
Articles 01 Oct 2002
Tip: Work with schemas and namespaces
This tip explains how the XML Schema specification requires one XML Schema per namespace, and shows you how to include more than one schema for a document and how to reference one schema from another.
Articles 01 Sep 2002
Tip: Make SOAP and Web servers cohabit peacefully
SOAP's strength is that it builds on the familiar and widely deployed Web infrastructure. That can also be a weakness because Web servers can make assumptions about Web services that are simply not true. In this installment, Benoit discusses some issues with error handling in Web services.
Also available in: Japanese  
Articles 19 Feb 2004
Tip: Control white space in an XSLT style sheet
This tip shows you how to control the production of white space in a transformation's result, which can lead to documents that more closely align with your requirements.
Also available in: Japanese  
Articles 01 Nov 2002
Tip: Make your CGI scripts available via XML-RPC
Utilizing XML-RPC instead of CGI
Articles 30 Apr 2003
Tip: Using pull-based DOMs
XML application developers usually have to contend with the complexities of SAX or the inefficiencies of DOM. This tip shows how a pull approach to DOM can effectively bridge the gap between the two by offering simple, efficient parsing.
Articles 01 May 2002
Tip: SAX and document order -- deliver maximally contiguous text
Previous tips in this series have explored how SAX can help delineate the relationships that exist between nodes in your XML documents. The tips have examined the use of document order and document order indices (DOIs) to track both parent-to-child and sibling-to-sibling relationships. This tip concludes the series with a look at character data and text nodes.
Articles 01 Feb 2003
Tip: SAX and document order -- track parent-child relationships
The tips in this series explore the concept of document order and the use of so-called document order indices in SAX. This tip looks at the use of DOIs in modeling parent-child relationships in XML documents. Such DOI representations of document hierarchy are useful in building applications, such as DOMs and query engines, that need to navigate through XML trees.
Articles 01 Jan 2003
Tip: SOAP 1.2 and the GET request
SOAP 1.2 brings changes that help to weave Web services more into the fabric of the Internet. One of these changes is the introduction of the GET method. GET is important because it enables various optimizations. This has been demonstrated by the Web itself, which uses GET extensively. Find out more in this tip.
Also available in: Russian   Japanese  
Articles 04 Mar 2004
Tip: Converting from DOM
In this tip, you'll learn how to convert DOM structures to SAX and JDOM to allow communication with applications that do not use DOM. The code listings demonstrate how to convert from DOM to an output stream for use by SAX, and how to convert from DOM to JDOM.
Also available in: Japanese  
Articles 01 Apr 2001
Tip: Load resources from the classpath
This tip describes how to use the EntityResolver interface to resolve entities using the local Java classpath.
Also available in: Japanese  
Articles 01 Aug 2002
Tip: Command-line XML processing
Most of the time, processing XML documents utilizes heavy-duty APIs and custom applications. However, the tradition of using small tools with I/O piped between them works fine on Unix-like platforms. Here, David shows you how you can use XML for this kind of quick-and-dirty processing with one-liners that are especially useful during development and debugging cycles.
Also available in: Japanese  
Articles 07 May 2003
Tip: Simplify with entity references
XML is primarily a static language. However, by using entity references, you can perform a limited amount of dynamic substitution. This tip explains how to use entity references, and shows you how they are useful.
Also available in: Japanese  
Articles 01 Jan 2003
Tip: Use rdf:about and rdf:ID effectively in RDF/XML
The combination of RDF and XML allows for several different approaches to specifying resources, and sometimes the rules for interpreting the syntax can be troublesome. In this tip, Uche Ogbuji uses examples to illustrate the various behaviors of the rdf:ID and rdf:about attributes, and shows how to use XML Base to control these behaviors.
Also available in: Japanese  
Articles 01 Feb 2003
Tip: Referencing XML schemas
Start using XML Schema to constrain XML documents. This brief tip tells how to reference an XML schema from your XML documents. Five pieces of sample code show how.
Also available in: Russian   Japanese  
Articles 01 Aug 2001
Tip: Using SAX InputSource effectively
This tip explains how using an InputStream to feed XML to the SAX API is significantly more efficient and safer than using a Reader as input. It also briefly touches on the impact of such a choice on internationalization.
Also available in: Japanese  
Articles 01 Aug 2002
Tip: Using fixed attributes in XML vocabularies
Fixed attributes are not the most common feature in XML, but they can sometimes come in surprisingly handy. In this tip, Uche Ogbuji introduces fixed attributes and shows how they can be used to reduce the visibility of XML namespaces to authors.
Articles 01 Sep 2002
Tip: Output large XML documents, Part 1
This tip details the problems associated with outputting large XML documents, starting with an examination of the options for XML output. It then looks at DOM and XML output, along with possible solutions to the memory consumption associated with extended DOM usage. You'll get an understanding of why outputting XML is so tricky, and a solid grasp of the output alternatives that are available.
Also available in: Japanese  
Articles 26 Mar 2003
Tip: Include external information with general entities
General entities enable XML authors to conveniently include not only characters that would be difficult to represent directly, but also information that must be repeated. They also enable you to import information from another file, as well as from another location. This tip shows you how to include external information through the use of general entities.
Articles 01 Jul 2002
1 - 100 of 109 results | Next
Show Summaries | Hide Summaries