Flash Conditional Compilations in CS4
More guide about how to use the conditional conpilation variables is in the following page:
http://permadi.com/blog/2009/04/flex-builder-conditional-compilation/
More guide about how to use the conditional conpilation variables is in the following page:
http://permadi.com/blog/2009/04/flex-builder-conditional-compilation/
<?php
$xmlData=simplexml_load_file("http://www.businessweek.com/rss/technology.rss");
echo var_dump($xmlData);;
?>
The result is below:
<?php
$xmlData=simplexml_load_file("http://www.businessweek.com/rss/technology.rss");
echo "
<h2>".$xmlData->channel->title."</h2>
";
echo "
<h3>Updated at ".$xmlData->channel->lastBuildDate."</h3>
";
echo "Copyright ".$xmlData->channel->copyright."";
?>
The result is below:
<?php
$xmlData=simplexml_load_file("http://www.businessweek.com/rss/technology.rss");
echo '<img src="'.$xmlData->channel->image->url.
'" width='.$xmlData->channel->image->width.
'" height='.$xmlData->channel->image->height.' ></img>';
?>
<?php
$xmlData=simplexml_load_file("http://www.businessweek.com/rss/technology.rss");
echo '<img src="'.$xmlData->channel->image->url.
'" width='.$xmlData->channel->image->width.
'" height='.$xmlData->channel->image->height.' ></img>';
echo "
";
for ($i=0; $i<count($xmlData->channel->item); $i++)
{
echo "Item ".$i.":".$xmlData->channel->item[$i]-><strong>title</strong>."
";
}
?>
<?php
for ($i=0; $i<count($xmlData->channel->item); $i++)
{
$link=$xmlData->channel->item[$i]-><strong>link</strong>;
$title=$xmlData->channel->item[$i]->title;
$publicationDate=$xmlData->channel->item[$i]-><strong>pubDate</strong>;
echo "
<h2><a href='".$link."'>".$title."</a></h2>
";
echo "
<h3>".$publicationDate."</h3>
<hr>";
}
?>
<?php
$xmlData=simplexml_load_file("http://www.businessweek.com/rss/technology.rss");
echo '<img src="'.$xmlData->channel->image->url.
'" width='.$xmlData->channel->image->width.
'" height='.$xmlData->channel->image->height.' ></img>';
echo "
";
for ($i=0; $i<count($xmlData->channel->item); $i++)
{
$link=$xmlData->channel->item[$i]->link;
$title=$xmlData->channel->item[$i]->title;
$publicationDate=$xmlData->channel->item[$i]->pubDate;
echo "
<div class='newsItem'><a href='".$link."'>".$title."</a>";
echo "
<div class='pubDate'>".$publicationDate."</div>
</div>
";
}
?>
Result:
This is curently in beta and has nice layout where the bottom of the screen contains a set of commonly used task icons, a calendar on the top, and flippable orientation when in horizontal position. http://hpp.intuitit.mobi/ . Screenshots are from Nexus One.

![]() |
![]() |
The Android SDK comes with several very nice examples. Here’s a short guide on how to compile and run them. This tutorial is intended for Eclipse begginners who are already familiar with progamming.
This assumes you have Android SDK and Eclipse already set-up, following this previous tutorial.


If you don’t see Android 2.1 listed, check the previous tutorial. Select Create project from existing sample in the Contents section.
The project name is automatically filled for you, but you can change it if you want.
If you don’t see the Package Explorer window, go to menu: Window->Show View->Package Explorer.

Here’s how the app looks in the simulator (if you see the lock screen, slide the lock to the right using the mouse.

<?php
$xmlData=simplexml_load_string("<root><node>This is a node</node></root>");
echo var_dump($xmlData);
?>
The output is below, as you can see, an object containing the XML tree has been created.
<?php
$xmlData=simplexml_load_string("<root><node>This is a node</node></root>");
echo $xmlData->node;
?>
The output is below:
<?php
$xmlData=simplexml_load_string("<root><nodes><node1 exampleAttribute='sample attribute'>Node 1 Content</node1></nodes></root>");
echo "Node 1 content is ".$xmlData->nodes->node1;
echo "Node 1 attribute is ".$xmlData->nodes->node1->attributes()->exampleAttribute;
?>
The output is below:
<?php
$xmlData=simplexml_load_string("<root><node1 att1='ATT1' att2='ATT2'>Content</node1></root>");
foreach ($xmlData->node1->attributes() as $attributeName=>$attributeValue)
{
echo "Node 1 has ".$attributeName . " with the value of " . $attributeValue;
}
?>
The output is below:
<?php
$xmlData=simplexml_load_string("<xml></xml>");
// Adding chld nodes
$book1=$xmlData->addChild("book1");
$book2=$xmlData->addChild("book2");
// Adding attributes
$book1->addAttribute("title", "Book1Title");
$book2->addAttribute("title", "Book2Title");
$book1->addChild("author", "Jim");
$book2->addChild("author", "James");
?>
The code above creates an XML that looks like this:
<xml> <book1 title="Book1Title"> <author>Jim</auhor> </book1> <book2 title="Book2Title"> <author>James</author> </book2> </xml>Let's access some of the nodes and print them out using the code below:
<?php echo $xmlData->book1->attributes()->title. "\n"; echo $xmlData->book2->attributes()->title. "\n"; echo $xmlData->book1->author. "\n"; echo $xmlData->book2->author. "\n"; ?>Here's the output:
<?php
$xmlData=new SimpleXMLElement("<xml></xml>");
// Adding child nodes
$book1=$xmlData->addChild("book1");
$book1->addAttribute("title", "Book1Title");
$book1->addChild("author", "Jim");
echo $book1->attributes()->title. "\n";
echo $book1->author. "\n";
?>
The output is as expected and shown below: