Archive for the ‘xml’ Category

Google News

Google News

Interview with Marissa Mayer: An American radio station has recently an interview with Marissa Mayer, one of the prominent heads with googles led. Like always, also in this nearly in-hour discussion too much is betrayed, some interesting information could not draw the radio moderator Marissa however. Who has desire and time, the interview in each case should sound itself. It is available in its whole length to the download. Don´t fuel element evil: Everything could have been so beautiful. By co-operation with `Suchmaschine´ Ecocho become green would have google the firm slogan `to Don´t fuel element evil´ again once into the act to convert to be able. Ecocho had indicated to plant per 1000 retrieval query 2 new trees. From this now probably nothing, because googles already quit co-operation after one week again. Probably simply too many users Robin Hood wanted to play and have frequently on google announcements clicked… (more…)

Posted by admin on May 30th, 2008 No Comments

The WCF MessageEncoder Decoded 3

Class Requirements

Like Channels and other classes in WCF, when you build a MessageEncoder you also build an accompanying MessageEncodingBindingElement and MessageEncoderFactory. Also, as with other WCF classes, the binding class handles configuration and the factory class handles creation. Following is the class declaration for TestEncoderFactory.

public class TestEncoderFactory : MessageEncoderFactory
{

Following is the class declaration for TestEncoderBinding.

public class TestEncoderBindingElement :
MessageEncodingBindingElement
{

As stated earlier, normally the MessageEncoder resides inside the Transport Channel. My WCF Channels and Binding article illustrates how to incorporate a MessageEncoder in the binding and use a MessageEncoder inside a Transport Channel. Typically, the MessageEncoder is created by using the following function calls and properties.
(more…)

Posted by admin on May 19th, 2008 No Comments

The WCF MessageEncoder Decoded 2

Sample Overview

The sample opens an XML file using the XmlDocument class, translates the XmlDocument into bytes, creates a Message class from the bytes, and then copies the Message class back into another XmlDocument class.

There are some things to consider before you explore the sample.

Aside from illustrating the steps to take building your own MessageEncoder, the sample provides no real practical solution.
(more…)

Posted by admin on May 14th, 2008 1 Comment

The WCF MessageEncoder Decoded 1

The MessageEncoder

MessageEncoders typically inhabit Transport Channels, although MessageEncoders can be used elsewhere in the Channel Stack. Often, a MessageEncoder’s sole purpose is to turn the bytes coming over the wire into a WCF Message Class representation.

Typically, bytes on the wire are a Multipurpose Internet Mail Extensions (MIME) content type. MIME support is a WCF cornerstone. WCF is also built for SOAP-based interactions. In fact, WCF comes equipped to handle multiple SOAP versions and various forms of XML data. MessageEncoders shipping with WCF can build messages from various content and SOAP protocols.
(more…)

Posted by admin on May 12th, 2008 2 Comments

Enabling XML parser validation

Enabling XML parser validation

By default, the parser (that is, the DocumentBuilder instance) returned by the factory will be non-validating. (Well-formedness errors will show up as a parse exception either way.) This means any careless (or malicious) user could insert any random and unexpected elements into the XML document and cause you all manner of grief. Of course, this is what DTDs and Schemas are for: They define the legal structure of a given XML document. Turning on validation mode is simply a matter of calling setValidating(true) on the DocumentBuilderFactory instance before having it return you a new DocumentBuilder. (And obviously, the input XML document must declare a DTD or schema somewhere to validate against.) Now, validation errors will generate additional exceptions when the DocumentBuilder attempts to parse the file into a Document.

(more…)

Posted by admin on May 11th, 2008 No Comments

Displaying XML in a Swing JTree

Displaying XML in a Swing JTree

Overview

It seems obvious enough: You have an XML document or fragment. XML is hierarchical. A Swing JTree displays hierarchical data. How do you make a JTree display your XML fragment?

If you understand that Swing’s architecture uses MVC, you probably know you need a “model” that your JTree instance can be instructed to use. However, the only real concrete model class in the standard Swing API is the DefaultTableModel class. This class provides objects to the tree that implement the TreeNode interface. If you have started down this path, subclassing and customizing the standard behavior of the DefaultTableModel and working with your own DefaultTreeNode objects just to display XML will quickly give you a headache.
(more…)

Posted by admin on May 7th, 2008 No Comments

Developing an Eclipse BIRT XML Report Rendering Extension

Developing an Eclipse BIRT XML Report Rendering Extension

BIRT Report Engine provides report rendering extensions that render a report in HTML, PDF, XLS, PostScript, and Microsoft Word and PowerPoint. In BIRT release 2.2.1, the BIRT report rendering extension API supports rendering a report in a customized format, such as XML.

This article describes a sample implementation of customized XML report rendering extension, org.eclipse.birt.report.engine.emitter.xml. The sample code creates a plug-in that writes the data contents of a report to a file in the specified format.
(more…)

Posted by admin on May 5th, 2008 No Comments

Styling XML Documents with CSS

Make Your XML Look How You Want it To with Cascading Style Sheets

Creating an XML document, writing the DTD, and parsing it with a browser are all fine, but how will the document display when you view it? XML is not a language of display. In fact, documents written with XML will have no formatting at all.
So, How Do I View My XML?

The key to viewing XML in a browser is Cascading Style Sheets. Style sheets allow you to define every aspect of your XML document, from the size and color of your text to the background and position of your non-text objects.

Say you have an XML document:

<?xml version=”1.0″ standalone=”yes”>
<!DOCTYPE family [
<!ELEMENT parent (#PCDATA)>
<!ELEMENT child (#PCDATA)>
]>

<family>
<parent>Judy</parent>
<parent>Layard</parent>
<child>Jennifer</child>
<child>Brendan</child>
</family>

Judy Layard Jennifer
Brendan

If you were to view that document in an XML ready browser, such as Internet Explorer, it would display something like this:
(more…)

Posted by admin on May 3rd, 2008 No Comments

XSL: The Style of XML

XSL: The Style of XML is deleted by Admin. For more information please send mail me.

Posted by admin on April 30th, 2008 1 Comment

Examining XML

The latest specification of the Extensible Markup Language is available online at the W3C. This specification completely describes XML. But it can be fairly difficult to understand. In this article, we will examine several parts of the XML specification in order to understand the basics of an XML document.

Definitions

characters
a character is one unit of text, such as a letter, numeral, space, tab, and other Unicode characters
DTD
Document Type Definition, the actual grammar of the XML document
Document Type Declaration, the statement at the top of valid XML documents defining where to find the Document Type Definition
entity
a storage unit for the XML document. Each XML document consists of one or more entities. For example, the HTML tag <html></html> defines an entire html entity.
XML
Extensible Markup Language
XML document
a document that is well-formed as described in the XML specification

XML Documents
As mentioned in the definitions, an XML document is comprised of entities and is well-formed if it conforms to the standards in the XML specification. There are some basic aspects of an XML document.

  • white space
    XML treats white space (spaces, tabs, carriage returns) the way HTML does. One or more white space character is treated as only one.
  • character tags
    XML uses the same characters as HTML for indicating tags and elements, specifically <, >, and &. It also uses the colon (:) within XML names for namespaces.
  • other characters
    Other ASCII and Unicode characters are taken as literal unless the DTD or other element of the document redefines them.
  • comments
    XML also uses the same comment style you are familiar with in HTML <– –>
  • processing instructions
    These are special tags created to contain instructions for applications. They are indicated with <? and ?> tags
  • CDATA
    When you have a large block of XML code you would like to comment out quickly or information you need to mark as data rather than actual code, you can use the <![CDATA[ tag and end the section with ]]>

(more…)

Posted by admin on April 1st, 2008 1 Comment