Leveraging pureXML in a Flex microblogging application, Part 3: Using pureXML Web services to publish microblog entries to an HTML page

Pull and publish recent updates to your pureXML database as an RSS feed or to Twitter

The pureXML® capabilities of IBM DB2® allow you to store XML natively in a database without modification, while Adobe® Flex® applications can read XML directly and populate Flex user interfaces. In this three-part article series, you will create a microblogging application that takes advantage of pureXML, Web services, and Adobe Flex; and even allows you to publish your microblogging updates on Twitter. In Part 1 of the series, you learned about Web Services and how they are enabled using DB2 pureXML as you created the microblog database and tested it. Part 2 tapped into Adobe Flex and ActionScript to create the user interface of your application. In this article, the final part of the series, you will learn how to use your pureXML Web Services to publish your microblog entries to an HTML page.

Share:

Joe Lennon, Software developer, Freelance

Joe Lennon photoJoe Lennon is a 24-year-old software developer from Cork, Ireland. Joe is author of the forthcoming Apress book Beginning CouchDB, and has contributed several technical articles and tutorials to IBM developerWorks. In his spare time, Joe likes to play football (soccer), tinker with gadgets and work on his Xbox 360 gamer score.


developerWorks Contributing author
        level

03 November 2009

Also available in Chinese Russian Japanese Portuguese

Prerequisites

In this article, you will use PHP to create the scripts for your Profile Badge Generator, RSS Publisher and Twitter push applications. You will use the open source Apache Web server and DB2 Express-C database server as part of the development environment. For information on downloading these, see Resources at the end of this article.


Introduction

Frequently used acronyms

  • API: Application program interface
  • HTML: Hypertext Markup Language
  • HTTP: Hypertext Transfer Protocol
  • RSS: Really Simple Syndication
  • SDK: Software Development Kit
  • SQL: Structured Query Language
  • URL: Uniform Resource Locator
  • XML: Extensible Markup Language

In the third and final part of this series on creating applications that interact with an IBM DB2 pureXML database, you will use the popular PHP language to create scripts for publishing and syndicating the status updates in your database across the Web.

First you will allow users to create a Profile Badge in HTML, which permits them to generate a piece of HTML code to paste into their blog or Web site. This will pull the latest status updates from the pureXML database and present them in a pre-defined format. Users will be able to customize the design of the badge, choosing from a selection of sizes and color schemes, and define the number of updates to be displayed. Next, you will create a PHP script to publish the latest status updates in the database as an RSS Feed. Finally, you will create a script that presents all of the status updates in the database to the users with a Post to Twitter button alongside each update. When a user presses this button, the Twitter API will take the specified post and add the update to the Twitter stream of that user.

Before you begin coding, however, you need to set up your development environment. The first thing you need to install is a Web server—in this case the open source Apache Web server. You then need to install PHP and configure it to work with Apache and DB2. To start, download and install Apache.

Installing Apache

Open your favorite Web browser and point it to the Apache HTTP Server download page (see Resources for a link). Scroll down and find the version denoted the best available version and locate the Win32 Binary without Crypto download. At the time of writing, the latest available version was 2.2.14.

Save the file to a convenient location (such as your Windows® desktop) and when it has completed, launch the .msi file to start the setup utility.

Click Next to continue, read the License Agreement, select the option I accept the terms in the license agreement and click Next. On the next screen, you will be presented with a Read This First document. Click Next to proceed.

On the Server Information screen, the values you enter aren't very important, as this is a development environment. you will access your Apache installation using the localhost address, so enter whatever domain and e-mail address you like. Under the Install Apache HTTP Server 2.2 programs and shortcuts for option, make sure you select the option for All Users, on Port 80, as a Service (the recommended option). My selections on this screen are in Figure 1. When you are ready, click Next.

Figure 1. Apache Server Information
Screen capture of the Apache Server Information dialog with network domain, server name, and administrator e-mail fields

You will now be asked to choose a setup type: Typical or Custom. Unless you want to change what components of the Apache Server get installed, you can safely choose Typical here. Press Next to continue.

On the Destination Folder screen, use the default option C:\Program Files\Apache Software Foundation\Apache2.2\.

You are now ready to begin the installation procedure. On the Ready to Install the Program screen, click Install to commence the installation.

The installation should only take a couple of minutes. When it has completed, you will see a screen like the one in Figure 2. Press Finish to close the installer.

Figure 2. Installation completed
Screen capture of the Installation completed dialog for the Apache server

If the installation was successful, Apache should now be running on your system. The first indication of this is that you should have a small icon in your system tray, which shows the Apache logo with a play button layered over it, as in Figure 3.

Figure 3. Apache system tray icon
Screen capture of the Apache system tray icon

Double-check that Apache is working. Open up your favorite Web browser, and in the address bar, enter the URL http://localhost/index.html. If the Apache installation was successful, you should see the message "It works!," as in Figure 4.

Figure 4. It works!
Screen capture of the 'It works!' message after a successful install of the Apache server

With Apache installed and working, let's move on and install PHP.

Installing PHP

You will need to download the latest Windows binaries for PHP (see Resources for a link). There are a lot of options here, but the one you want is the VC6 x86 Thread Safe version (see Figure 5) of PHP version 5.2.x (5.2.11 was the latest branch at the time of writing). Do NOT use PHP 5.3, as it does not support PHP Extension Community Library (PECL) extensions at this time. Under this, choose the Zip file (don't download the Installer or Debug Pack).

Figure 5. The PHP Windows binaries download page
Screen capture of the PHP Windows binaries download page

Save this file to a convenient location. When the download completes, extract the contents of the Zip archive to the folder C:\php. The contents of the folder will include multiple lib and php dll files plus PEAR and other folders; it should look like the one in Figure 6.

Figure 6. The contents of the C:\php folder
Screen capture of the contents of the C:\php folder

You need to modify your system path, and add your PHP installation folder to it. In the Windows Control Panel, open System. From there, click on the Advanced tab (see Figure 7).

Figure 7. System properties
Screen capture of the Advanced tab on the System Properties dialog

Click on Environment Variables to open another dialog. Under System variables, find the Path variable, select it, and click Edit (see Figure 8).

Figure 8. Environment variables
Screen capture of the System variables window on the Environment variables dialog

In the Edit System Variable dialog, append the value ;c:\php to the Variable value field, as in Figure 9.

Figure 9. Edit system variable
Screen capture of the Edit system variable dialog with ;c:\php value added

Press OK on the three open windows to close them. In the C:\php folder, you will find a file named php.ini-recommended. Copy this file and paste it into the same folder, but rename it to php.ini. You now need to download the DB2 extension for PHP (see Resources for a link). You'll download an archive of PECL extensions for PHP. Extract this archive wherever you like. Now open the folder you extracted the files to and find the file php_ibm_db2.dll. Copy this file and paste it into the folder C:\php\ext. With the DB2 extension available, you must now configure PHP to use it.

Edit the file C:\php\php.ini with your favorite text editor, and find the line that reads extension_dir = "./". Change this line to read: extension_dir = "c:\php\ext". Now find the dynamic extensions section of this file. The last line will read something like: ;extension=php_zip.dll. Below this line, add the following line to enable the DB2 extension: extension=php_ibm_db2.dll. In the extensions section, find the line ;extension=php_curl.dll and remove the comment semi-colon character at the start of the line so it reads: extension=php_curl.dll.

Save this file, as you are now finished configuring PHP. It is time to configure the Apache installation to tell it where to find PHP. Open the Apache configuration file, located at C:\Program Files\Apache Software Foundation\Apache2.2\conf\httpd.conf. Open this file with your favorite text editor, and add the following lines in Listing 1 to the bottom of the file.

Listing 1. Configuring Apache for PHP - httpd.conf file
LoadModule php5_module "c:/php/php5apache2_2.dll"
AddType application/x-httpd-php .php
PHPIniDir "C:/php"

Save the httpd.conf file and close your text editor. Now left-click on the Apache icon in your system tray and choose Apache2.2>Restart. The Web server will stop and then restart. If all goes well, your Web server should be running with PHP and the DB2 extension all configured correctly.

Do a quick test to check that PHP and DB2 extensions are indeed working. Open your text editor once more, and create a new file with the following contents: <?php phpinfo(); ?>

Save this file as test.php in the folder C:\Program Files\Apache Software Foundation\Apache2.2\htdocs. Now open your Web browser and point it to http://localhost/test.php. You should see a page with information about your PHP application, similar to the one in Figure 10.

Figure 10. PHP information page
Screen capture of the PHP information page

While merely seeing this page confirms that PHP is working, what about the DB2 extension? If you scroll halfway down the page, you should see a section entitled ibm_db2 as in Figure 11. This indicates that the DB2 extension was loaded successfully.

Figure 11. ibm_db2 extension information
Screen capture of the ibm_db2 extension information

With PHP and the DB2 extension for PHP installed and configured, you are now ready to start working with your DB2 database in PHP. In the next section you'll test that everything works by connecting to your DB2 database and you will retrieve some data using PHP.


Connecting to DB2 with PHP

Now let's test the connection to the DB2 database. Open your text editor and create a new file, adding the contents of Listing 2 to it. Save this file as test_db.php in the folder C:\Program Files\Apache Software Foundation\Apache2.2\htdocs. You might need to change the $db, $user and $pass variables to the values you used when working with DB2 itself in Part 1 of this series. The $user is the Schema your tables are located in.

Listing 2. test_db.php
<?php
$db = 'MBLOG';
$user = 'MBLOG';
$pass = 'password';
$host = 'localhost';
$port = 50000;

$settings = "DRIVER={IBM DB2 ODBC DRIVER};DATABASE=$db; " .
    "HOSTNAME=$host;PORT=$port;PROTOCOL=TCPIP;UID=$user;PWD=$pass; ";

$conn = db2_connect($settings, '', '');

if(!$conn) {
    echo "Connection failed<br />";
    echo db2_conn_errormsg($conn);
}

$sql = "SELECT * FROM status_updates";
$result = db2_exec($conn, $sql);
echo "<ul>";
while($row = db2_fetch_array($result)) {
    echo "<li>$row[0]</li>";
}
echo "</ul>";
?>

To open this script in your Web browser, visit http://localhost/test_db.php. You should see a list with concatenated date-time stamps and messages similar to the one in Figure 12.

Figure 12. Retrieving data from DB2 using PHP
Screen capture of the concatenated date-time and message data retrieved from DB2 using PHP

You should recognize this data; it's the data from the DB2 database you created in Part 1 of this series. Now that you have PHP up and running and pulling data from your database, you can move forward and start putting together some nice features using PHP. In the next section you will create a PHP script that will allow you to generate a Profile Badge, with HTML code that you can simply paste into a Web site or blog to add the microblog updates to that page.


Creating HTML badges

In the previous section, you got up and running with retrieving data from your DB2 database using PHP. In Figure 12, you might have noticed that although your data is stored as XML in the database, when you used a SELECT statement to retrieve everything from the database, it was not returning XML but rather a string with the date_created and text tags values concatenated together. Of course, you will need to retrieve each of these fields individually so you can nicely format your HTML badges.

The first thing to create is a DB2 view that will use SQL/XML to separate the data in your pureXML database into separate columns that PHP can parse easily. If you prefer, you can also use XQuery to do this.

Open the DB2 Command Editor application (Start>Programs>IBM DB2>DB2COPY1 (Default)>Command Line Tools>Command Editor). Be sure to select the MBLOG database as your target, and then enter the code from Listing 3 below into the editor area.

Listing 3. Create updates view
CREATE VIEW updates(date_created, text) AS
SELECT t.date_created, t.text FROM status_updates su,
XMLTABLE('$u/update' passing su.data as "u"
columns date_created varchar(100) path 'date_created',
text varchar(500) path 'text') as t;

Now, press the green Play button to the top left of the editor area to run the statement. You should receive a success message in the response area. Before you move on, check that the view is working properly. In the editor area, replace the statement with the following: select date_created, text from updates;.

You should now see a result similar to the one in Figure 13.

Figure 13. Result of executing the Updates view
Screen capture of the result of executing the Updates view with separate date-time and message data

The SELECT statement above retrieves the data from your status_updates table in individual columns named date_created and text. You can use a similar SELECT statement in PHP to make it much easier to work with the DB2 data.

Now start on the Profile Badge Generator. The first PHP script you need to create is the form for the Badge Generator. This form will ask the users what color (white, yellow or grey) and what size (wide or narrow) they want their badge to use. When a user clicks on the Generate button, he is shown what his badge looks like and presented with the HTML code that he can use to paste the badge into his blog or Web site.

The first file you need to create is generate.php, which you should save in the folder C:\Program Files\Apache Software Foundation\Apache2.2\htdocs. Listing 4 contains the content of this script.

Listing 4. generate.php
<html>
<head>
<?php
if(isset($_GET['size']) && isset($_GET['color'])) {
    if($_GET['size'] == "wide") $size = 'width="400" height="150"';
    else $size = 'width="200" height="300"';
    ?>
    <title>Your Profile Badge is Ready!</title></head>
    <body><h1>Your Profile Badge is Ready!</h1>
    <iframe src="badge.php" frameborder="1" scrolling="auto" <?php echo 
$size; ?>
        marginheight="0" marginwidth="0"
        style="background-color: <?php echo $_GET['color']; ?>;">
        Older browser see this message as iframes aren't supported.
    </iframe><br /><br />
    Paste the following code into your blog or Website HTML code in order to add
    the Profile Badge to that page:<br />
    <textarea readonly="readonly" cols="40" rows="5">
<iframe src="http://localhost/badge.php" frameborder="1" scrolling="auto"
<?php echo $size; ?>
    marginheight="0" marginwidth="0"
    style="background-color: <?php echo $_GET['color']; ?>;">
    Older browser see this message as iframes aren't supported.
    </iframe>
    </textarea>
    <?php
} else {
    ?>
    <title>Generate Profile Badge</title></head>
    <body><h1>Generate Profile Badge</h1>
    <form method="get" action="generate.php">
    <strong>Color:</strong><br />
    <input type="radio" name="color" value="white" /> White
    <input type="radio" name="color" value="yellow" /> Yellow
<input type="radio" name="color" value="silver" /> Grey
    <br /><br /><strong>Size:</strong><br />
    <input type="radio" name="size" value="wide" /> Wide
    <input type="radio" name="size" value="narrow" /> Narrow
    <br /><br /><input type="submit" value="Generate!" />
    </form>
    <?php
}
</body></html>
?>

If the form has not yet been submitted, the script will show the form to the users, asking them to select a color and size for the Profile Badge. If the user has already submitted the form, the Profile Badge IFRAME will display, with the HTML code to include the IFRAME in other pages included at the bottom. Before you can try this out for yourself, however, you need to build the actual badge itself. Add the code in Listing 5 to a new file, badge.php and save it in the same folder as generate.php.

Listing 5. badge.php
<?php
$db = 'MBLOG';
$user = 'MBLOG';
$pass = 'password';
$host = 'localhost';
$port = 50000;

$settings = "DRIVER={IBM DB2 ODBC DRIVER};DATABASE=$db; " . 
    "HOSTNAME=$host;PORT=$port;PROTOCOL=TCPIP;UID=$user;PWD=$pass; ";

$conn = db2_connect($settings, '', '');

if(!$conn) {
    echo "Connection failed<br />";
    echo db2_conn_errormsg($conn);
}

?>
<style type="text/css">
.update { border-bottom: 1px solid black; padding: 5px; }
</style>

<?php
$sql = "SELECT text, date_created FROM updates order by date_created desc";
$result = db2_exec($conn, $sql);
if(!$result) echo db2_stmt_errormsg();
else {
echo '<div class="updates">';
while($row = db2_fetch_array($result)) {
        if(strlen($row[0]) > 0 && strlen($row[1]) > 0) {
echo '<div class="update">'
                .'<div class="update_text">'.$row[0].'</div>'
                .'<div class="update_date"><em>'.$row[1].'
</em></div>'
                .'</div>';
        }
}
echo "</div>";
}
?>

This script connects to your DB2 database and retrieves the status updates from the DB2 view you created at the start of this section. It checks that both the text and date_created fields contain some data, and then it displays them. This script gets called into an IFRAME tag by other pages so that it is shown inside those pages, making it easy to drop it into blogs or Web sites.

Open your Web browser and navigate to http://localhost/generate.php. You should see a page like the one in Figure 14.

Figure 14. Generate profile badge page
Screen capture of the Generate Profile Badge page with color and size radio buttons

Select a color and size and press the Generate! button. Based on your selections, you should see a page similar to the one in Figure 15.

Figure 15. Profile badge result page
Screen capture of the Profile badge result page with list of date-time stamps and messages plus the code in the iframe

Of course, you can make many styling and functional improvements to this Profile Badge. You might add your company logo, a link to the generator page, format the date that is displayed, filter the number of updates to be shown, and so forth.


Publishing an RSS feed

In this section, you will use PHP to generate an RSS Feed for your microblog application. In your text editor, create a new file and save it as rss.php in the folder C:\Program Files\Apache Software Foundation\Apache2.2\htdocs. Listing 6 shows the contents of this file.

Listing 6. rss.php
<?php
header("Content-type: text/rss+xml");
header("Pragma: no-cache");

echo '<?xml version="1.0" encoding="utf-8"?>';
echo '<rss version="2.0">';
echo '<channel>';
echo '  <title>Microblog RSS Feed</title>';
echo '  <description>An RSS Feed of Microblog Status'. 
'Updates</description>';
echo '  <link>http://localhost/rss.php</link>';
echo '  <language>en-us</language>';
echo '  <generator>DB2 Microblog</generator>';

$database = 'MBLOG';
$user = 'JOE LENNON';
$password = 'password';
$hostname = 'localhost';
$port = 50000;

$settings = "DRIVER={IBM DB2 ODBC DRIVER};DATABASE=$database;" .
    "HOSTNAME=$hostname;PORT=$port;PROTOCOL=TCPIP;" .
    "UID=$user;PWD=$password;";

$conn = db2_connect($settings, '', '');

$sql = "select text, date_created from updates order by date_created desc";
$result = db2_exec($conn, $sql);

while($row = db2_fetch_array($result)) {
    if(strlen($row[0]) > 0 && strlen($row[1]) > 0) {
        $pub_date = $row[1];
        $pub_date = str_replace('T', '-', $pub_date);
        $pub_date = str_replace(':', '-', $pub_date);
        $date_array = explode("-", $pub_date);
        $timestamp = mktime($date_array[3], $date_array[4], 
$date_array[5], $date_array[1], $date_array[2],
$date_array[0]);
        $rss_date = date(DATE_RSS, $timestamp);

        echo '<item>';
        echo '  <title>'.htmlentities($row[0]).'</title>';
        echo '  <description>'.htmlentities($row[0]).'</description>';
        echo '  <pubDate>'.$rss_date.'</pubDate>';
        echo '  <link>http://localhost/generator.php</link>';
        echo '</item>';
    }
}

echo '</channel>';
echo '</rss>';
?>

This script generates an XML document in the standard RSS 2.0 format, pulling the entries from your DB2 database. To view the feed, open an RSS-compatible Web browser or RSS Feed Reader application and visit the URL http://localhost/rss.php. You should see something like the view in Figure 16.

Figure 16. The RSS feed in action
Screen capture of he RSS feed for a microblog with a list of link items

Your RSS Feed generator at present links each entry to the Profile Badge generator page. Of course, if you have a Web site with each update on its own page, you can provide a link to that page in the feed. It also retrieves the data from the database each and every time it is run. A better solution might be to have a cron job or scheduled task that calls a PHP script at pre-defined intervals, which in turn generates the RSS feed and saves it to a file called rss.xml. You can then point your readers/subscribers to the rss.xml file rather than to the dynamic rss.php script.


Integrating with Twitter

The final script you will create is a script that allows you to push a microblog entry from our database to Twitter using the Twitter API. In this script, you will first present the user with a list of all the updates in the database, and beside each will be a link Push to Twitter. When you click on this link, the Twitter API will add the entry as a new Twitter update.

First, create a new file in your text editor, saving it as twitter.php in the folder C:\Program Files\Apache Software Foundation\Apache2.2\htdocs. Listing 7 shows the contents of this file.

Listing 7. twitter.php
<?php
if(isset($_GET['text'])) {
    $ch = curl_init("http://www.twitter.com/statuses/update.xml?status=".
urlencode(stripslashes(urldecode($_GET['text']))));
    curl_setopt($ch, CURLOPT_VERBOSE, 1);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($ch, CURLOPT_HTTPHEADER, array('Expect:'));
    curl_setopt($ch, CURLOPT_USERPWD, "joelennon:password");
    curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1);
    curl_setopt($ch, CURLOPT_POST, 1);
    $result = curl_exec($ch);
    $res_info = curl_getinfo($ch);
    curl_close($ch);

    if($res_info['http_code'] == '200') {
        echo '<h1>Yippee! Your update was posted to Twitter!</h1>';
    } else {
        echo '<h1>Whoops! Something seemed to go wrong when posting '.
'to Twitter...</h1>';
    }
} else {
    $database = 'MBLOG';
    $user = 'JOE LENNON';
    $password = 'password';
    $hostname = 'localhost';
    $port = 50000;

    $settings = "DRIVER={IBM DB2 ODBC DRIVER};DATABASE=$database;" .
        "HOSTNAME=$hostname;PORT=$port;PROTOCOL=TCPIP;" .
        "UID=$user;PWD=$password;";

    $conn = db2_connect($settings, '', '');
    $sql = "select text, date_created from updates order by ".
"date_created";
    $result = db2_exec($conn, $sql);

    echo '<h1>Push to Twitter</h1>';
    echo '<ul>';
    while($row = db2_fetch_array($result)) {
        if(strlen($row[0]) > 0 && strlen($row[1]) > 0) {
            echo '<li><strong>'.htmlentities($row[0]).'</strong>'.
' (<a href="twitter.php?text='.htmlentities($row[0]).'">Push to '.
'Twitter</a>)<br /><em>Posted '.$row[1].'</em></li>';
        }
    }
    echo '</ul>';
}
?>

In this script, when the user first opens the page, he will see a list of status updates, each with a link Push to Twitter. When a use clicks that link, the script will use PHP's curl extensions (which you enabled earlier in this article when you configured PHP) to post the update on Twitter using the Twitter API. Be sure to change the CURL_USERPWD value to your own Twitter account. Point your Web browser to http://localhost/twitter.php, and you should see something like the page in Figure 17.

Figure 17. Push updates to Twitter
Screen capture of the Push Updates to Twitter page

When you click on one of the Push to Twitter links, your update should post to Twitter. If the script receives a success response message, you will see a message like the one in Figure 18.

Figure 18. Twitter status updated
Screen capture of the Twitter status updated

All that's left now is to check your Twitter page to see your new post. I visited my page at http://twitter.com/joelennon and I saw my update there for the world to see, in all its glory, as in Figure 19.

Figure 19. The update on Twitter
Screen capture of the update on the author's Twitter page

There are many areas for improvement with this script. For starters, there is no way to tell whether an update was already pushed to Twitter or not. Ideally, you can either let the user know that it was already pushed or simply not show it at all. Another nice feature might be to expand the Flex application you built in Part 2 of this series, providing the user with an option to post the update to Twitter and the microblog application simultaneously.


Summary

In this third and final part of the series on creating a microblogging application using IBM DB2 pureXML and Flex, you took an in-depth look at leveraging your microblog data to produce some useful scripts. First, you installed the Apache Web server and PHP, along with a PHP extension for IBM DB2 support. Next, you created a Profile Badge generator in PHP that creates neat HTML code ready to insert into a blog or Web page. You then syndicated your microblog updates using RSS, before finally integrating your application with Twitter by allowing the user to push microblog status updates to Twitter using curl and the Twitter API.

In this series you have covered a broad range of topics: IBM DB2 Express-C, DB2 pureXML, SQL/XML, XQuery, pureXML Web Services, IBM Data Studio, IBM WebSphere Application Server Community Edition, Adobe Flex, Apache, PHP, RSS feeds and the Twitter API. You should have more than ample experience with any of these technologies now to go further and produce some more advanced applications.


Download

DescriptionNameSize
Article source codexmlflexpt3.source.zip5KB

Resources

Learn

Get products and technologies

Discuss

Comments

developerWorks: Sign in

Required fields are indicated with an asterisk (*).


Need an IBM ID?
Forgot your IBM ID?


Forgot your password?
Change your password

By clicking Submit, you agree to the developerWorks terms of use.

 


The first time you sign into developerWorks, a profile is created for you. Information in your profile (your name, country/region, and company name) is displayed to the public and will accompany any content you post, unless you opt to hide your company name. You may update your IBM account at any time.

All information submitted is secure.

Choose your display name



The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerWorks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

Required fields are indicated with an asterisk (*).

(Must be between 3 – 31 characters.)

By clicking Submit, you agree to the developerWorks terms of use.

 


All information submitted is secure.

Dig deeper into XML on developerWorks


static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=XML, Information Management, Open source, Web development
ArticleID=442070
ArticleTitle=Leveraging pureXML in a Flex microblogging application, Part 3: Using pureXML Web services to publish microblog entries to an HTML page
publish-date=11032009