Archive for September, 2009

Oracle APEX: Easily Integrate Custom Web PL/SQL Procedures and Packages

Sunday, September 13th, 2009

In this post, we look at a code authorization utility consisting of a schema, a table, and a PL/SQL package that allows developers to easily integrate their own custom web PL/SQL code into an Oracle APEX application.  The utility works in conjunction with APEX’s built-in security function, wwv_flow_epg_include_mod_local, that determines if a given procedure is authorized to be executed by the APEX PL/SQL DAD.  The security function resides in Oracle APEX home schema (in this case, APEX_030200), and must be customized to allow custom (external) procedures.  Most examples of customizing the security function demonstrate the use of an IF statement that grows as new procedures are added to the list of authorized procedures.  Each time a new procedure is added, the function must be edited and then compiled.  The utility presented here replaces that IF statement with a single function and allows the developer to register an entire package or just a single procedure. Compile and forget …

The Utility …

The custom procedure authorization utility consists of the following pieces:

  • A database schema called APEX_ADD_ONS -  schema that holds the components related to the authorization utility (tables, packages, etc …).
  • A table called APEX_ALLOWED_EXECUTE – table that holds the names and types of all authorized procedures and packages.
  • A PL/SQL package called APEX_ADD_ON_UTILS – contains all of the constants, functions, and procedures required to add, removes, and validate a package or procedure.
  • The customized version of APEX_030200.wwv_flow_epg_include_mod_local.

The APEX_ALLOWED_EXECUTE table is defined as follows:

/*
Table used by the APEX_030200.wwv_flow_epg_include_mod_local function to
verify procedures that can be called thru the promary APEX
PL/SQL DAD.

*/

CREATE TABLE APEX_ALLOWED_EXECUTE(
code_name VARCHAR2(200) NOT NULL,
code_type VARCHAR2(10) NOT NULL
)
/

CREATE OR REPLACE TRIGGER UPPER_CASES_CODE
BEFORE INSERT OR UPDATE ON APEX_ALLOWED_EXECUTE
FOR EACH ROW
DECLARE
BEGIN

:NEW.CODE_NAME := UPPER(:NEW.CODE_NAME);
:NEW.CODE_TYPE := UPPER(:NEW.CODE_TYPE);

END;
/

CREATE PUBLIC SYNONYM APEX_ALLOWED_EXECUTE FOR APEX_ALLOWED_EXECUTE;

/* This grant should be to the schema that houses APEX … older versions were called FLOWS_<version>*/
GRANT SELECT ON APEX_ALLOWED_EXECUTE TO APEX_030200;

The APEX_ADD_ON_UTILS PL/SQL package is defined as follows:

/*

APEX_ADD_ONS Utility package.
Package contains utilities that allow for

*/

CREATE OR REPLACE PACKAGE APEX_ADD_ON_UTILS AS

/*————————————————-*/
/* Constants used to Identify Executable Code Type */
/*————————————————-*/

CODE_TYPE_PROCEDURE CONSTANT VARCHAR2(9)  := ‘PROCEDURE’;
CODE_TYPE_PACKAGE   CONSTANT VARCHAR2(10) := ‘PACKAGE’;

/*———————————————*/
/* Make sure to add name as it will be called. */
/* i.e.  <schema>.<package>.<proc> or          */
/* <schema>.<proc> or just plain old <proc>     */
/*———————————————*/
PROCEDURE addAllowedExecute(p_name VARCHAR2 := NULL,p_code_type VARCHAR2 := CODE_TYPE_PROCEDURE);

PROCEDURE removeAllowedExecutable(p_name VARCHAR2 := NULL,p_code_type VARCHAR2 := CODE_TYPE_PROCEDURE);

/*——————————————————*/
/* This function should be embedded within the          */
/* APEX_030200.wwv_flow_epg_include_mod_local function. */
/*——————————————————*/

FUNCTION  isAllowedExecute(p_name VARCHAR2 := NULL) RETURN BOOLEAN;

END;
/
sho err;

/******************************************************************************************************************************************************/
/************************************************************** PACKAGE BODY **************************************************************************/
/******************************************************************************************************************************************************/

CREATE OR REPLACE PACKAGE BODY APEX_ADD_ON_UTILS AS

PROCEDURE addAllowedExecute(p_name      VARCHAR2 := NULL,
p_code_type VARCHAR2 := CODE_TYPE_PROCEDURE)
IS

v_sql_chk VARCHAR2(200) := ‘SELECT count(”x”) FROM apex_allowed_execute WHERE upper(code_name) = :code_name AND code_type= :code_type’;
v_chk_val NUMBER(5)     := 0;

v_sql_ins VARCHAR2(200) := ‘INSERT INTO apex_allowed_execute(code_name,code_type) VALUES (:code_name,:code_type)’;

BEGIN

EXECUTE IMMEDIATE v_sql_chk INTO v_chk_val USING UPPER(p_name),UPPER(p_code_type);

IF v_chk_val = 0 THEN

EXECUTE IMMEDIATE v_sql_ins USING UPPER(p_name),UPPER(p_code_type);
COMMIT;

END IF;

END;

/*====================================================================================================================================*/

PROCEDURE removeAllowedExecutable(p_name      VARCHAR2 := NULL,
p_code_type VARCHAR2 := CODE_TYPE_PROCEDURE)
IS

v_sql VARCHAR2(200) := ‘DELETE FROM apex_allowed_execute WHERE code_name = :code_name AND code_type := :code_type’;

BEGIN

BEGIN
EXECUTE IMMEDIATE v_sql USING UPPER(p_name),UPPER(p_code_type);
COMMIT;
EXCEPTION
WHEN NO_DATA_FOUND THEN
NULL;
END;

END;

/*===================================================================================================================================*/

FUNCTION  isAllowedExecute(p_name VARCHAR2 := NULL) RETURN BOOLEAN
IS

CURSOR crsrCheckProc(cv_code_name VARCHAR2,
cv_code_type VARCHAR2) IS
SELECT
‘x’
FROM
apex_allowed_execute
WHERE
code_name = cv_code_name
AND    code_type = cv_code_type;

v_package_name VARCHAR2(200) := NULL;

BEGIN

– Check for matching procedure name

FOR data_rec IN crsrCheckProc(UPPER(p_name),CODE_TYPE_PROCEDURE) LOOP

RETURN TRUE;

END LOOP;

– Try to isolate package name from <schema>.<package>.<code> or <package>.<code> or <package>
IF INSTR(p_name,’.',1,2) > 0 THEN

v_package_name:= SUBSTR(p_name,1,INSTR(p_name,’.',1,2)-1);

ELSIF INSTR(p_name,’.',1,1) > 0 THEN

v_package_name := SUBSTR(p_name,1,INSTR(p_name,’.',1,1)-1);

ELSE

v_package_name := p_name;

END IF;

FOR data_rec IN crsrCheckProc(UPPER(v_package_name),CODE_TYPE_PACKAGE) LOOP

RETURN TRUE;

END LOOP;

RETURN FALSE;

END;

/*=============*/
/* END PACKAGE */
/*=============*/

END;
/
sho err;

CREATE PUBLIC SYNONYM APEX_ADD_ON_UTILS FOR APEX_ADD_ON_UTILS;
GRANT EXECUTE ON APEX_ADD_ON_UTILS TO APEX_030200;

The modifed APEX_030200.wwv_flow_epg_include_mod_local function looks like:

/*

Created a schema called APEX_ADD_ONS and a packaged function called APEX_ADD_ON_UTILS.isAllowedExecute
that compares the passed procedure name with a table stored list of allowed packages and procedures.

Run this script as SYS or other user that can alter the session and set it to the owning
schema for Oracle APEX.

*/

alter session set current_schema=APEX_030200;

CREATE OR REPLACE function wwv_flow_epg_include_mod_local(procedure_name in varchar2)return boolean
IS
BEGIN

IF APEX_ADD_ONS.APEX_ADD_ON_UTILS.isAllowedExecute(upper(procedure_name)) THEN

RETURN TRUE;

END IF;

RETURN FALSE;

END;
/

How it works …

We’ve briefly taken a look at all of the pieces of the utility, but how does it work?  The following scenario demonstrates how to add a package (or procedure … same process) as  authorized to be executed in an Oracle APEX application.

First, let’s look at what happens when we add a PL/SQL region to a page containing a reference to a PL/SQL packaged procedure that IS NOT registered with the utility as being authorized.

ApexCustomWebPLSQL1

The following code was added to the PL/SQL region displayed above:

IF NOT APEX_ADD_ON_UTILS.isAllowedExecute(‘HRChartsDemo.dataSet’)OR
NOT APEX_ADD_ON_UTILS.isAllowedExecute(‘FusionFlashCharts’) THEN

htp.p(‘<div style=”color:red”><b>Unauthorized Stored Procedure Call</b></div>’);

END IF;

htp.p(‘<div id=”OPC_Div”>’);

FusionFlashCharts.addChart(p_chart_id     =>’OfficesPerCountry’,
p_chart_type   => FusionFlashCharts.Column3D,
p_chart_width  =>’600′,
p_chart_height =>’400′,
p_data_url     =>’HRChartsDemo.dataSet?p_set_code=OPC’);

htp.p(‘</div>’);

In the code sample above, we execute a packaged procedure called FusionFlashCharts.addChart that will generate a Fusion Flash Charts  3D bar chart.  The procedure produces the following HTML:

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase=http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="800" height="600" id="OfficesPerCountry" >
<param id="movie_OfficesPerCountry" name="movie" value="FusionFlashCharts.swf?p_chart_code=CL3D" />
<param id="FlashVars_OfficesPerCountry" name="FlashVars" value="&dataURL=HRChartsDemo.dataSet%3Fp_set_code=OPC&chartWidth=800&chartHeight=600">
<param id="quality_OfficesPerCountry" name="quality" value="high" />
<embed id="embed_OfficesPerCountry" src="FusionFlashCharts.swf?p_chart_code=CL3D" flashVars="&dataURL=HRChartsDemo.dataSet%3Fp_set_code=OPC&chartWidth=800&chartHeight=600" quality="high" width="800" height="600" name="OfficesPerCountry" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>

In the HTML above, there are references to two Web PL/SQL packaged procedures that must be executed through the APEX DAD:

  • FusionFlashCharts.swf – Streams the requested Flash based chart object
  • HRChartsDemo.dataSet – Generates the XML data set required to populate the chart.

Since we have not yet registered these packaged procedures with APEX using the wwv_flow_epg_include_mod_local function, we see the following output when executing the page:

ApexCustomWebPLSQL2

Notice in the image above that no chart was displayed, and our error message indicating that references to unauthorized procedures have been made is being displayed.  The <object> tag was unable to load the .swf file.  It is also unable to execute the code that generates the data set for the chart.  How can we fix this issue?  We have to either authorize the two offending package procedures, or simply authorize the packages themselves.  Here is the code we would execute to accomplish the task:

BEGIN
APEX_ADD_ON_UTILS.addAllowedExecute(‘FusionFlashCharts’,APEX_ADD_ON_UTILS.CODE_TYPE_PACKAGE);
APEX_ADD_ON_UTILS.addAllowedExecute(‘HRChartsDemo’,APEX_ADD_ON_UTILS.CODE_TYPE_PACKAGE);
END;
/

The code above places references to the two packages into the APEX_ALLOWED_EXECUTE table.  If we refresh the APEX page after executing the code, we will see that the chart is rendered:

ApexCustomWebPLSQL3

** Note ** We still have grant execute on any package or procedure to the user (or schema) assigned to the APEX PL/SQL DAD.  In this case, the user is ANONYMOUS.

Wrapping it up …

Using the method described in this post, we can easily add (and remove) stand alone and packaged procedures the “Oracle APEX execution authorization list” without having to edit and compile the APEX_030200.wwv_flow_epg_include_mod_local function.   If you would like the code for creating this utility, you can get it here: ApexAddOns.zip.  If you have any questions, please feel free to contact me.

Exposing Web Services as Database Views

Monday, September 7th, 2009

In recent years, Web Services have become the defacto standard in passing  data between applications.   They make communication between disparate computer languages and architectures relatively simple.  For the most part, we tend to think of web services in terms of traditional application development (Java, .NET, Ruby, PHP, etc …) and inter-process communication.  What if we looked at them from another perspective?  What if we could easily integrate web services into the database?  Make them consumable by Business Intelligence tools, and Data Mining engines WITHOUT having to change the traditional manner in which these tools access data … the standard table and view structure.  SQL is much less complicated than XPath (my opinion)! The remainder of this post is dedicated to demonstrating how to expose a web service as a database view using only resources found in the Oracle database. The method we will explore for exposing a web service as a view utilizes several built-in Oracle database features: PL/SQL (built in packages and the basic fare), XMLTable,  XMLType, and XQuery.

Consuming the Web Service

First and foremost … we have to consume or access a web service before we can expose it’s results in view form.  Web services use a protocol called SOAP (Simple Object Access Protocol).  In order to access the web service, we need to be able to construct, send, and receive SOAP messages.    Oracle provides a built-in PL/SQL package called UTL_HTTP that makes a simple matter to construct a SOAP API.  Tim Hall has created a simple and easy to use PL/SQL based SOAP API and I have created a utility/API which sits on top of his API that makes this step very simple.  Please see my previous post, PL/SQL Web Service Utility: Accessing Web Services with PL/SQL is Simple! , for all the details and code.  The examples in this post will utilize the code and methods introduced in that article.

Taking the SOAP Response and Creating a View …

The data that is received in response to a SOAP query is returned as an XML document.  Using a few other built-in Oracle features (XMLTable, XQuery, and XMLType  … note that XQuery is not available with Oracle 10g XE), we can query that XML data with a SQL statement.   At this point, creating the view is simple.  All we need is that SQL statement and we are in business!  The following two examples demonstrate the processes.  One example demonstrates this method on a simple XML structure returned by a web service provider, and the other example uses a more complex XML structure.  Both of the web services used in these examples are public web services from out in “the wild” (found them on Seekda! ).

Example 1 … Yesterday’s MLB Scores

This example creates a view based on a web service that returns all of the MLB (Major League Baseball) scores for a given date.   I could have used stock data … but what’s the fun in that?  The XML returned by this service has a flat structure, making it very uncomplicated to map elements to query columns using the XMLTable function.

Step 1. Create a PL/SQL function (packaged or stand alone) that returns the Web Service results as an XMLType object.

CREATE OR REPLACE FUNCTION getBaseballScoresWS(p_date VARCHAR2 := TO_CHAR(SYSDATE,’DD MON YYYY’))
RETURN XMLType
ISv_service_def WebServiceUtils.SERVICE_DEFINITION_TYPE;
v_param       WebServiceUtils.service_param_type;
v_param_list  WebServiceUtils.service_param_list := WebServiceUtils.service_param_list();

BEGIN

v_service_def.service_name       :=  ‘MLBScoresStr’;
v_service_def.service_url        :=  ‘http://www.streamingscores.com/livescoresservice.asmx’;
v_service_def.service_action_url :=  ‘http://StreamingScores.com/MLBScoresStr’;
v_service_def.service_ns         :=  ‘http://StreamingScores.com’;

v_param.name      := ‘date’;
v_param.data_type := ‘s:string’;
v_param.value     := p_date;

WebServiceUtils.addParamToCollection(v_param_list,v_param);

v_service_def.service_params := v_param_list;

RETURN XMLType(WebServiceUtils.executeWebService(v_service_def));

END;

The function returns the full  SOAP response with the following structure:

<soap:Envelope xmlns:soap=”http://schemas.xmlsoap.org/soap/envelope/” xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” xmlns:xsd=”http://www.w3.org/2001/XMLSchema”>
<soap:Body>
<MLBScoresStrResponse xmlns=”http://StreamingScores.com”>
<MLBScoresStrResult>
<Game>
<SportID>1</SportID>
<GameId>18931</GameId>
<AwayTeamID>0</AwayTeamID>
<AwayTeam>Twins</AwayTeam>
<AwayTeamAbbrev>MIN</AwayTeamAbbrev>
<HomeTeamID>0</HomeTeamID>
<HomeTeam>Indians</HomeTeam>
<HomeTeamAbbrev>CLE</HomeTeamAbbrev>
<AwayWins>68</AwayWins>
<AwayLosses>68</AwayLosses>
<AwayTies>0</AwayTies>
<HomeWins>60</HomeWins>
<HomeLosses>76</HomeLosses>
<HomeTies>0</HomeTies>
<AwayRank>0</AwayRank>
<HomeRank>0</HomeRank>
<AwayScore>1</AwayScore>
<HomeScore>3</HomeScore>
<AwayPitcher>N. Blackburn</AwayPitcher>
<HomePitcher>D. Huff</HomePitcher>
<Inning>Final</Inning>
<Balls>0</Balls>
<Strikes>0</Strikes>
<Outs>0</Outs>
<TimeRemaining>0</TimeRemaining>
<StoppageTime>0</StoppageTime>
<StartTime>9/06 1:05 PM</StartTime>
<StartTimeUTC>2009-09-06T17:05:00Z</StartTimeUTC>
<TimeZoneOffset>240</TimeZoneOffset>
<TimeTBD>false</TimeTBD>
<HasTip>false</HasTip>
</Game>
<Game>
<SportID>1</SportID>
<GameId>18932</GameId>
<AwayTeamID>0</AwayTeamID>
<AwayTeam>Yankees</AwayTeam>
<AwayTeamAbbrev>NYY</AwayTeamAbbrev>
<HomeTeamID>0</HomeTeamID>
<HomeTeam>Blue Jays</HomeTeam>
<HomeTeamAbbrev>TOR</HomeTeamAbbrev>
<AwayWins>87</AwayWins>
<AwayLosses>49</AwayLosses>
<AwayTies>0</AwayTies>
<HomeWins>60</HomeWins>
<HomeLosses>75</HomeLosses>
<HomeTies>0</HomeTies>
<AwayRank>0</AwayRank>
<HomeRank>0</HomeRank>
<AwayScore>8</AwayScore>
<HomeScore>14</HomeScore>
<AwayPitcher>S. Mitre</AwayPitcher>
<HomePitcher>B. Tallet</HomePitcher>
<Inning>Top 8th</Inning>
<Runners/>
<Balls>0</Balls>
<Strikes>0</Strikes>
<Outs>1</Outs>
<TimeRemaining>0</TimeRemaining>
<StoppageTime>0</StoppageTime>
<StartTime>9/06 1:07 PM</StartTime>
<StartTimeUTC>2009-09-06T17:07:00Z</StartTimeUTC>
<TimeZoneOffset>240</TimeZoneOffset>
<TimeTBD>false</TimeTBD>
<HasTip>false</HasTip>
</Game>
<Game>
<SportID>1</SportID>
<GameId>18924</GameId>
<AwayTeamID>0</AwayTeamID>
<AwayTeam>Cubs</AwayTeam>
<AwayTeamAbbrev>CHC</AwayTeamAbbrev>
<HomeTeamID>0</HomeTeamID>
<HomeTeam>Mets</HomeTeam>
<HomeTeamAbbrev>NYM</HomeTeamAbbrev>
<AwayWins>68</AwayWins>
<AwayLosses>66</AwayLosses>
<AwayTies>0</AwayTies>
<HomeWins>61</HomeWins>
<HomeLosses>75</HomeLosses>
<HomeTies>0</HomeTies>
<AwayRank>0</AwayRank>
<HomeRank>0</HomeRank>
<AwayScore>2</AwayScore>
<HomeScore>4</HomeScore>
<AwayPitcher>R. Wells</AwayPitcher>
<HomePitcher>M. Pelfrey</HomePitcher>
<Inning>Final</Inning>
<Balls>0</Balls>
<Strikes>0</Strikes>
<Outs>0</Outs>
<TimeRemaining>0</TimeRemaining>
<StoppageTime>0</StoppageTime>
<StartTime>9/06 1:10 PM</StartTime>
<StartTimeUTC>2009-09-06T17:10:00Z</StartTimeUTC>
<TimeZoneOffset>240</TimeZoneOffset>
<TimeTBD>false</TimeTBD>
<HasTip>false</HasTip>
</Game>
<Game>
<SportID>1</SportID>
<GameId>18925</GameId>
<AwayTeamID>0</AwayTeamID>
<AwayTeam>Cardinals</AwayTeam>
<AwayTeamAbbrev>STL</AwayTeamAbbrev>
<HomeTeamID>0</HomeTeamID>
<HomeTeam>Pirates</HomeTeam>
<HomeTeamAbbrev>PIT</HomeTeamAbbrev>
<AwayWins>81</AwayWins>
<AwayLosses>56</AwayLosses>
<AwayTies>0</AwayTies>
<HomeWins>53</HomeWins>
<HomeLosses>81</HomeLosses>
<HomeTies>0</HomeTies>
<AwayRank>0</AwayRank>
<HomeRank>0</HomeRank>
<AwayScore>5</AwayScore>
<HomeScore>4</HomeScore>
<AwayPitcher>J. Piñeiro</AwayPitcher>
<HomePitcher>P. Maholm</HomePitcher>
<Inning>Bot 9th</Inning>
<Runners/>
<Balls>0</Balls>
<Strikes>0</Strikes>
<Outs>0</Outs>
<TimeRemaining>0</TimeRemaining>
<StoppageTime>0</StoppageTime>
<StartTime>9/06 1:35 PM</StartTime>
<StartTimeUTC>2009-09-06T17:35:00Z</StartTimeUTC>
<TimeZoneOffset>240</TimeZoneOffset>
<TimeTBD>false</TimeTBD>
<HasTip>false</HasTip>
</Game>
<Game>
<SportID>1</SportID>
<GameId>18926</GameId>
<AwayTeamID>0</AwayTeamID>
<AwayTeam>Marlins</AwayTeam>
<AwayTeamAbbrev>FLA</AwayTeamAbbrev>
<HomeTeamID>0</HomeTeamID>
<HomeTeam>Nationals</HomeTeam>
<HomeTeamAbbrev>WAS</HomeTeamAbbrev>
<AwayWins>72</AwayWins>
<AwayLosses>64</AwayLosses>
<AwayTies>0</AwayTies>
<HomeWins>46</HomeWins>
<HomeLosses>90</HomeLosses>
<HomeTies>0</HomeTies>
<AwayRank>0</AwayRank>
<HomeRank>0</HomeRank>
<AwayScore>4</AwayScore>
<HomeScore>3</HomeScore>
<AwayPitcher>A. Sánchez</AwayPitcher>
<HomePitcher>J. Martin</HomePitcher>
<Inning>Bot 9th</Inning>
<Runners>1</Runners>
<Balls>0</Balls>
<Strikes>0</Strikes>
<Outs>0</Outs>
<TimeRemaining>0</TimeRemaining>
<StoppageTime>0</StoppageTime>
<StartTime>9/06 1:35 PM</StartTime>
<StartTimeUTC>2009-09-06T17:35:00Z</StartTimeUTC>
<TimeZoneOffset>240</TimeZoneOffset>
<TimeTBD>false</TimeTBD>
<HasTip>false</HasTip>
</Game>
<Game>
<SportID>1</SportID>
<GameId>18927</GameId>
<AwayTeamID>0</AwayTeamID>
<AwayTeam>Reds</AwayTeam>
<AwayTeamAbbrev>CIN</AwayTeamAbbrev>
<HomeTeamID>0</HomeTeamID>
<HomeTeam>Braves</HomeTeam>
<HomeTeamAbbrev>ATL</HomeTeamAbbrev>
<AwayWins>62</AwayWins>
<AwayLosses>73</AwayLosses>
<AwayTies>0</AwayTies>
<HomeWins>70</HomeWins>
<HomeLosses>66</HomeLosses>
<HomeTies>0</HomeTies>
<AwayRank>0</AwayRank>
<HomeRank>0</HomeRank>
<AwayScore>2</AwayScore>
<HomeScore>2</HomeScore>
<AwayPitcher>J. Cueto</AwayPitcher>
<HomePitcher>T. Hudson</HomePitcher>
<Inning>Top 10th</Inning>
<Runners/>
<Balls>0</Balls>
<Strikes>0</Strikes>
<Outs>2</Outs>
<TimeRemaining>0</TimeRemaining>
<StoppageTime>0</StoppageTime>
<StartTime>9/06 1:35 PM</StartTime>
<StartTimeUTC>2009-09-06T17:35:00Z</StartTimeUTC>
<TimeZoneOffset>240</TimeZoneOffset>
<TimeTBD>false</TimeTBD>
<HasTip>false</HasTip>
</Game>
<Game>
<SportID>1</SportID>
<GameId>18933</GameId>
<AwayTeamID>0</AwayTeamID>
<AwayTeam>Rangers</AwayTeam>
<AwayTeamAbbrev>TEX</AwayTeamAbbrev>
<HomeTeamID>0</HomeTeamID>
<HomeTeam>Orioles</HomeTeam>
<HomeTeamAbbrev>BAL</HomeTeamAbbrev>
<AwayWins>76</AwayWins>
<AwayLosses>59</AwayLosses>
<AwayTies>0</AwayTies>
<HomeWins>55</HomeWins>
<HomeLosses>81</HomeLosses>
<HomeTies>0</HomeTies>
<AwayRank>0</AwayRank>
<HomeRank>0</HomeRank>
<AwayScore>0</AwayScore>
<HomeScore>7</HomeScore>
<AwayPitcher>D. Holland</AwayPitcher>
<HomePitcher>J. Guthrie</HomePitcher>
<Inning>Top 9th</Inning>
<Runners>2,3</Runners>
<Balls>0</Balls>
<Strikes>0</Strikes>
<Outs>2</Outs>
<TimeRemaining>0</TimeRemaining>
<StoppageTime>0</StoppageTime>
<StartTime>9/06 1:35 PM</StartTime>
<StartTimeUTC>2009-09-06T17:35:00Z</StartTimeUTC>
<TimeZoneOffset>240</TimeZoneOffset>
<TimeTBD>false</TimeTBD>
<HasTip>false</HasTip>
</Game>
<Game>
<SportID>1</SportID>
<GameId>18934</GameId>
<AwayTeamID>0</AwayTeamID>
<AwayTeam>Tigers</AwayTeam>
<AwayTeamAbbrev>DET</AwayTeamAbbrev>
<HomeTeamID>0</HomeTeamID>
<HomeTeam>Rays</HomeTeam>
<HomeTeamAbbrev>TB</HomeTeamAbbrev>
<AwayWins>74</AwayWins>
<AwayLosses>61</AwayLosses>
<AwayTies>0</AwayTies>
<HomeWins>72</HomeWins>
<HomeLosses>63</HomeLosses>
<HomeTies>0</HomeTies>
<AwayRank>0</AwayRank>
<HomeRank>0</HomeRank>
<AwayScore>5</AwayScore>
<HomeScore>3</HomeScore>
<AwayPitcher>E. Jackson</AwayPitcher>
<HomePitcher>W. Davis</HomePitcher>
<Inning>Top 9th</Inning>
<Runners>3</Runners>
<Balls>0</Balls>
<Strikes>0</Strikes>
<Outs>2</Outs>
<TimeRemaining>0</TimeRemaining>
<StoppageTime>0</StoppageTime>
<StartTime>9/06 1:38 PM</StartTime>
<StartTimeUTC>2009-09-06T17:38:00Z</StartTimeUTC>
<TimeZoneOffset>240</TimeZoneOffset>
<TimeTBD>false</TimeTBD>
<HasTip>false</HasTip>
</Game>
<Game>
<SportID>1</SportID>
<GameId>18928</GameId>
<AwayTeamID>0</AwayTeamID>
<AwayTeam>Phillies</AwayTeam>
<AwayTeamAbbrev>PHI</AwayTeamAbbrev>
<HomeTeamID>0</HomeTeamID>
<HomeTeam>Astros</HomeTeam>
<HomeTeamAbbrev>HOU</HomeTeamAbbrev>
<AwayWins>77</AwayWins>
<AwayLosses>56</AwayLosses>
<AwayTies>0</AwayTies>
<HomeWins>65</HomeWins>
<HomeLosses>70</HomeLosses>
<HomeTies>0</HomeTies>
<AwayRank>0</AwayRank>
<HomeRank>0</HomeRank>
<AwayScore>3</AwayScore>
<HomeScore>4</HomeScore>
<AwayPitcher>C. Hamels</AwayPitcher>
<HomePitcher>B. Norris</HomePitcher>
<Inning>Top 8th</Inning>
<Runners/>
<Balls>0</Balls>
<Strikes>0</Strikes>
<Outs>0</Outs>
<TimeRemaining>0</TimeRemaining>
<StoppageTime>0</StoppageTime>
<StartTime>9/06 2:05 PM</StartTime>
<StartTimeUTC>2009-09-06T18:05:00Z</StartTimeUTC>
<TimeZoneOffset>240</TimeZoneOffset>
<TimeTBD>false</TimeTBD>
<HasTip>false</HasTip>
</Game>
<Game>
<SportID>1</SportID>
<GameId>18929</GameId>
<AwayTeamID>0</AwayTeamID>
<AwayTeam>Giants</AwayTeam>
<AwayTeamAbbrev>SF</AwayTeamAbbrev>
<HomeTeamID>0</HomeTeamID>
<HomeTeam>Brewers</HomeTeam>
<HomeTeamAbbrev>MIL</HomeTeamAbbrev>
<AwayWins>75</AwayWins>
<AwayLosses>61</AwayLosses>
<AwayTies>0</AwayTies>
<HomeWins>65</HomeWins>
<HomeLosses>70</HomeLosses>
<HomeTies>0</HomeTies>
<AwayRank>0</AwayRank>
<HomeRank>0</HomeRank>
<AwayScore>1</AwayScore>
<HomeScore>1</HomeScore>
<AwayPitcher>J. Sánchez</AwayPitcher>
<HomePitcher>B. Looper</HomePitcher>
<Inning>Top 8th</Inning>
<Runners/>
<Balls>0</Balls>
<Strikes>0</Strikes>
<Outs>0</Outs>
<TimeRemaining>0</TimeRemaining>
<StoppageTime>0</StoppageTime>
<StartTime>9/06 2:05 PM</StartTime>
<StartTimeUTC>2009-09-06T18:05:00Z</StartTimeUTC>
<TimeZoneOffset>240</TimeZoneOffset>
<TimeTBD>false</TimeTBD>
<HasTip>false</HasTip>
</Game>
<Game>
<SportID>1</SportID>
<GameId>18935</GameId>
<AwayTeamID>0</AwayTeamID>
<AwayTeam>Red Sox</AwayTeam>
<AwayTeamAbbrev>BOS</AwayTeamAbbrev>
<HomeTeamID>0</HomeTeamID>
<HomeTeam>White Sox</HomeTeam>
<HomeTeamAbbrev>CHW</HomeTeamAbbrev>
<AwayWins>78</AwayWins>
<AwayLosses>57</AwayLosses>
<AwayTies>0</AwayTies>
<HomeWins>68</HomeWins>
<HomeLosses>69</HomeLosses>
<HomeTies>0</HomeTies>
<AwayRank>0</AwayRank>
<HomeRank>0</HomeRank>
<AwayScore>3</AwayScore>
<HomeScore>0</HomeScore>
<AwayPitcher>J. Lester</AwayPitcher>
<HomePitcher>J. Danks</HomePitcher>
<Inning>Mid 7th</Inning>
<Runners/>
<Balls>0</Balls>
<Strikes>0</Strikes>
<Outs>3</Outs>
<TimeRemaining>0</TimeRemaining>
<StoppageTime>0</StoppageTime>
<StartTime>9/06 2:05 PM</StartTime>
<StartTimeUTC>2009-09-06T18:05:00Z</StartTimeUTC>
<TimeZoneOffset>240</TimeZoneOffset>
<TimeTBD>false</TimeTBD>
<HasTip>false</HasTip>
</Game>
<Game>
<SportID>1</SportID>
<GameId>18936</GameId>
<AwayTeamID>0</AwayTeamID>
<AwayTeam>Angels</AwayTeam>
<AwayTeamAbbrev>LAA</AwayTeamAbbrev>
<HomeTeamID>0</HomeTeamID>
<HomeTeam>Royals</HomeTeam>
<HomeTeamAbbrev>KC</HomeTeamAbbrev>
<AwayWins>80</AwayWins>
<AwayLosses>54</AwayLosses>
<AwayTies>0</AwayTies>
<HomeWins>51</HomeWins>
<HomeLosses>84</HomeLosses>
<HomeTies>0</HomeTies>
<AwayRank>0</AwayRank>
<HomeRank>0</HomeRank>
<AwayScore>7</AwayScore>
<HomeScore>2</HomeScore>
<AwayPitcher>J. Saunders</AwayPitcher>
<HomePitcher>L. Hochevar</HomePitcher>
<Inning>Bot 6th</Inning>
<Runners>1,2,3</Runners>
<Balls>0</Balls>
<Strikes>0</Strikes>
<Outs>1</Outs>
<TimeRemaining>0</TimeRemaining>
<StoppageTime>0</StoppageTime>
<StartTime>9/06 2:10 PM</StartTime>
<StartTimeUTC>2009-09-06T18:10:00Z</StartTimeUTC>
<TimeZoneOffset>240</TimeZoneOffset>
<TimeTBD>false</TimeTBD>
<HasTip>false</HasTip>
</Game>
<Game>
<SportID>1</SportID>
<GameId>18930</GameId>
<AwayTeamID>0</AwayTeamID>
<AwayTeam>D’Backs</AwayTeam>
<AwayTeamAbbrev>ARZ</AwayTeamAbbrev>
<HomeTeamID>0</HomeTeamID>
<HomeTeam>Rockies</HomeTeam>
<HomeTeamAbbrev>COL</HomeTeamAbbrev>
<AwayWins>61</AwayWins>
<AwayLosses>76</AwayLosses>
<AwayTies>0</AwayTies>
<HomeWins>76</HomeWins>
<HomeLosses>60</HomeLosses>
<HomeTies>0</HomeTies>
<AwayRank>0</AwayRank>
<HomeRank>0</HomeRank>
<AwayScore>1</AwayScore>
<HomeScore>4</HomeScore>
<AwayPitcher>Y. Petit</AwayPitcher>
<HomePitcher>J. De La Rosa</HomePitcher>
<Inning>Bot 3rd</Inning>
<Runners>1,2</Runners>
<Balls>0</Balls>
<Strikes>0</Strikes>
<Outs>2</Outs>
<TimeRemaining>0</TimeRemaining>
<StoppageTime>0</StoppageTime>
<StartTime>9/06 3:10 PM</StartTime>
<StartTimeUTC>2009-09-06T19:10:00Z</StartTimeUTC>
<TimeZoneOffset>240</TimeZoneOffset>
<TimeTBD>false</TimeTBD>
<HasTip>false</HasTip>
</Game>
<Game>
<SportID>1</SportID>
<GameId>18937</GameId>
<AwayTeamID>0</AwayTeamID>
<AwayTeam>Mariners</AwayTeam>
<AwayTeamAbbrev>SEA</AwayTeamAbbrev>
<HomeTeamID>0</HomeTeamID>
<HomeTeam>Athletics</HomeTeam>
<HomeTeamAbbrev>OAK</HomeTeamAbbrev>
<AwayWins>72</AwayWins>
<AwayLosses>65</AwayLosses>
<AwayTies>0</AwayTies>
<HomeWins>60</HomeWins>
<HomeLosses>76</HomeLosses>
<HomeTies>0</HomeTies>
<AwayRank>0</AwayRank>
<HomeRank>0</HomeRank>
<AwayScore>1</AwayScore>
<HomeScore>0</HomeScore>
<AwayPitcher>D. Fister</AwayPitcher>
<HomePitcher>G. González</HomePitcher>
<Inning>Bot 1st</Inning>
<Runners>1,2</Runners>
<Balls>0</Balls>
<Strikes>0</Strikes>
<Outs>1</Outs>
<TimeRemaining>0</TimeRemaining>
<StoppageTime>0</StoppageTime>
<StartTime>9/06 4:05 PM</StartTime>
<StartTimeUTC>2009-09-06T20:05:00Z</StartTimeUTC>
<TimeZoneOffset>240</TimeZoneOffset>
<TimeTBD>false</TimeTBD>
<HasTip>false</HasTip>
</Game>
<Game>
<SportID>1</SportID>
<GameId>19401</GameId>
<AwayTeamID>0</AwayTeamID>
<AwayTeam>Padres</AwayTeam>
<AwayTeamAbbrev>SD</AwayTeamAbbrev>
<HomeTeamID>0</HomeTeamID>
<HomeTeam>Dodgers</HomeTeam>
<HomeTeamAbbrev>LAD</HomeTeamAbbrev>
<AwayWins>60</AwayWins>
<AwayLosses>77</AwayLosses>
<AwayTies>0</AwayTies>
<HomeWins>81</HomeWins>
<HomeLosses>56</HomeLosses>
<HomeTies>0</HomeTies>
<AwayRank>0</AwayRank>
<HomeRank>0</HomeRank>
<AwayScore>0</AwayScore>
<HomeScore>0</HomeScore>
<AwayPitcher>T. Stauffer</AwayPitcher>
<HomePitcher>H. Kuroda</HomePitcher>
<Inning>0</Inning>
<Balls>0</Balls>
<Strikes>0</Strikes>
<Outs>0</Outs>
<TimeRemaining>0</TimeRemaining>
<StoppageTime>0</StoppageTime>
<StartTime>9/06 8:10 PM</StartTime>
<StartTimeUTC>2009-09-07T00:10:00Z</StartTimeUTC>
<TimeZoneOffset>240</TimeZoneOffset>
<TimeTBD>false</TimeTBD>
<HasTip>false</HasTip>
</Game>
</MLBScoresStrResult>
</MLBScoresStrResponse>
</soap:Body>
</soap:Envelope>

Step 2. Create a Query and View from the Resulting XML

Now that we have the XML, we use the XMLTable function and an XQuery expression to create a query and define a view based on this query (Notice the use of the namespace below …  if it’s specified in the XML, it must be used when parsing it.):

CREATE OR REPLACE VIEW MLB_SCORES_VIEW AS
SELECT
HomeTeam,
HomeTeamAbbrev,
AwayTeam,
AwayTeamAbbrev,
HomeScore,
AwayScore,
HomePitcher,
AwayPitcher,
CurrentInning,
Balls,
Strikes,
Outs,
TimeRemaining
FROM
XMLTable(XMLNamespaces(‘http://StreamingScores.com’ AS “x”),
‘for $i in $xml return $i//x:Game’
PASSING getBaseballScoresWS  as “xml”
COLUMNS
HomeTeam          VARCHAR2(100) PATH ‘x:HomeTeam’,
HomeTeamAbbrev    VARCHAR2(4)   PATH ‘x:HomeTeamAbbrev’,
AwayTeam          VARCHAR2(100) PATH ‘x:AwayTeam’,
AwayTeamAbbrev    VARCHAR2(4)   PATH ‘x:AwayTeamAbbrev’,
HomeScore         NUMBER(3)     PATH ‘x:HomeScore’,
AwayScore         NUMBER(3)     PATH ‘x:AwayScore’,
HomePitcher       VARCHAR2(100) PATH ‘x:HomePitcher’,
AwayPitcher       VARCHAR2(100) PATH ‘x:AwayPitcher’,
CurrentInning     VARCHAR2(50)  PATH ‘x:Inning’,
Balls             NUMBER(1)     PATH ‘x:Balls’,
Strikes           NUMBER(1)     PATH ‘x:Strikes’,
Outs              NUMBER(1)     PATH ‘x:Outs’,
TimeRemaining     VARCHAR2(50)  PATH ‘x:TimeRemaining’
) a
/

Example 2.  What’s Showing at the Movies …

This example uses a web service that lists theaters,  movies, and movie times for a given zipcode.  The steps are exactly same as in the previous example.  However, this example is little more complex.  The XML returned by this web service doesn’t lend itself as easily to be queried.  In the previous example the resulting XML had more of a flattened structure (one to one relationships), where as the XML returned in this example has more of relational structure (one to many relationships), which means we have to manipulate the XML into a flattened structure using an XQuery FLWOR (FOR, LET, WHERE, ORDER BY, RETURN) expression.

Step 1. Create the Function to reeturn our XML from the Web Service …

CREATE OR REPLACE FUNCTION getMovieListWS(p_zipcode VARCHAR2 := ’28216′,
p_radius  VARCHAR2 := ’5′)  RETURN XMLType
IS

v_service_def WebServiceUtils.SERVICE_DEFINITION_TYPE;
v_param       WebServiceUtils.service_param_type;
v_param_list  WebServiceUtils.service_param_list := WebServiceUtils.service_param_list();

BEGIN

v_service_def.service_name       :=  ‘GetTheatersAndMovies’;
v_service_def.service_url        :=  ‘http://www.ignyte.com/webservices/ignyte.whatsshowing.webservice/moviefunctions.asmx’;
v_service_def.service_action_url :=  ‘http://www.ignyte.com/whatsshowing/GetTheatersAndMovies’;
v_service_def.service_ns         :=  ‘http://www.ignyte.com/whatsshowing’;

v_param.name      := ‘zipCode’;
v_param.data_type := ‘s:string’;
v_param.value     := p_zipcode;

v_param_list.EXTEND;
v_param_list(v_param_list.COUNT) := v_param;

v_param.name      := ‘radius’;
v_param.data_type := ‘s:int’;
v_param.value     := p_radius;

v_param_list.EXTEND;
v_param_list(v_param_list.COUNT) := v_param;

v_service_def.service_params := v_param_list;

RETURN XMLType(WebServiceUtils.executeWebService(v_service_def));

END;
/

Here is the resulting XML response.  Notice the one to many relationship between Theater tag and the Movies tag …

soap:Envelope xmlns:soap=”http://www.w3.org/2003/05/soap-envelope” xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” xmlns:xsd=”http://www.w3.org/2001/XMLSchema”>
<soap:Body>
<GetTheatersAndMoviesResponse xmlns=”http://www.ignyte.com/whatsshowing”>
<GetTheatersAndMoviesResult>
<Theater>
<Name>AMC Northlake 14</Name>
<Address>7325 Northlake Mall Drive, Charlotte, NC</Address>
<Movies>
<Movie>
<Rating>PG-13</Rating>
<Name>All About Steve</Name>
<RunningTime>1 hr 39 mins</RunningTime>
<ShowTimes>11:20am | 2:00pm | 4:50pm | 7:30pm | 10:00pm</ShowTimes>
</Movie>
<Movie>
<Rating>PG-13</Rating>
<Name>Carriers</Name>
<RunningTime>1 hr 24 mins</RunningTime>
<ShowTimes>10:30am | 12:50pm | 3:10pm | 5:30pm | 7:40pm | 10:10pm</ShowTimes>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>District 9</Name>
<RunningTime>1 hr 51 mins</RunningTime>
<ShowTimes>11:00am | 1:50pm | 4:40pm | 7:30pm | 10:20pm</ShowTimes>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>Extract</Name>
<RunningTime>1 hr 31 mins</RunningTime>
<ShowTimes>10:00am | 12:20pm | 3:00pm | 5:40pm | 8:10pm | 10:40pm</ShowTimes>
</Movie>
<Movie>
<Rating>PG</Rating>
<Name>G-Force</Name>
<RunningTime>1 hr 28 mins</RunningTime>
<ShowTimes>1:40pm | 6:30pm</ShowTimes>
</Movie>
<Movie>
<Rating>PG-13</Rating>
<Name>G.I. Joe: The Rise of Cobra</Name>
<RunningTime>1 hr 58 mins</RunningTime>
<ShowTimes>10:30am | 1:20pm | 4:10pm | 7:00pm | 9:50pm</ShowTimes>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>Gamer</Name>
<RunningTime>1 hr 35 mins</RunningTime>
<ShowTimes>11:50am | 2:30pm | 5:10pm | 7:50pm | 10:30pm</ShowTimes>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>Halloween II</Name>
<RunningTime>1 hr 45 mins</RunningTime>
<ShowTimes>2:30pm | 5:20pm | 7:50pm | 10:40pm</ShowTimes>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>Inglourious Basterds</Name>
<RunningTime>2 hrs 32 mins</RunningTime>
<ShowTimes>12:00pm | 3:30pm | 6:50pm | 10:05pm</ShowTimes>
</Movie>
<Movie>
<Rating>PG-13</Rating>
<Name>Julie &amp; Julia</Name>
<RunningTime>2 hrs 04 mins</RunningTime>
<ShowTimes>10:20am | 1:10pm | 4:10pm | 7:20pm | 10:30pm</ShowTimes>
</Movie>
<Movie>
<Rating>PG-13</Rating>
<Name>Post Grad</Name>
<RunningTime>1 hr 29 mins</RunningTime>
<ShowTimes>1:20pm</ShowTimes>
</Movie>
<Movie>
<Rating>PG</Rating>
<Name>Shorts</Name>
<RunningTime>1 hr 29 mins</RunningTime>
<ShowTimes>11:20am | 4:00pm | 9:00pm</ShowTimes>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>Taking Woodstock</Name>
<RunningTime>2 hrs 00 mins</RunningTime>
<ShowTimes>4:20pm | 7:15pm | 10:10pm</ShowTimes>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>The Final Destination</Name>
<RunningTime>1 hr 22 mins</RunningTime>
<ShowTimes>10:00am | 12:20pm | 2:40pm | 5:00pm | 7:20pm | 9:40pm | 10:40am | 1:00pm | 3:20pm | 5:40pm | 8:00pm | 10:20pm</ShowTimes>
</Movie>
<Movie>
<Rating>PG-13</Rating>
<Name>The Time Traveler’s Wife</Name>
<RunningTime>1 hr 47 mins</RunningTime>
<ShowTimes>1:30pm | 4:20pm | 7:10pm | 10:00pm</ShowTimes>
</Movie>
</Movies>
</Theater>
<Theater>
<Name>Observer Omnimax Theatre</Name>
<Address>301 North Tryon Street, Charlotte, NC</Address>
<Movies>
<Movie>
<Rating>G</Rating>
<Name>Under the Sea 3D</Name>
<RunningTime>0 hrs 35 mins</RunningTime>
<ShowTimes>1:00pm | 3:00pm | 4:00pm</ShowTimes>
</Movie>
</Movies>
</Theater>
<Theater>
<Name>Epicentre Theater 5</Name>
<Address>210 E Trade St., Charlotte, NC</Address>
<Movies>
<Movie>
<Rating>PG-13</Rating>
<Name>All About Steve</Name>
<RunningTime>1 hr 39 mins</RunningTime>
<ShowTimes>12:30pm | 3:40pm | 6:50pm | 9:40pm</ShowTimes>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>District 9</Name>
<RunningTime>1 hr 51 mins</RunningTime>
<ShowTimes>10:00pm</ShowTimes>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>Extract</Name>
<RunningTime>1 hr 31 mins</RunningTime>
<ShowTimes>12:45pm | 3:50pm | 7:00pm | 9:50pm</ShowTimes>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>Inglourious Basterds</Name>
<RunningTime>2 hrs 32 mins</RunningTime>
<ShowTimes>12:00pm | 3:20pm | 6:25pm | 9:30pm</ShowTimes>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>The Goods: Live Hard. Sell Hard.</Name>
<RunningTime>1 hr 29 mins</RunningTime>
<ShowTimes>1:00pm | 4:00pm | 7:10pm</ShowTimes>
</Movie>
<Movie>
<Rating>PG-13</Rating>
<Name>The Time Traveler’s Wife</Name>
<RunningTime>1 hr 47 mins</RunningTime>
<ShowTimes>12:15pm | 3:30pm | 6:35pm | 9:20pm</ShowTimes>
</Movie>
</Movies>
</Theater>
<Theater>
<Name>Regal Manor Theatre</Name>
<Address>607 Providence Road, Charlotte, NC</Address>
<Movies>
<Movie>
<Rating>PG-13</Rating>
<Name>Adam</Name>
<RunningTime>1 hr 37 mins</RunningTime>
<ShowTimes>2:00pm | 4:10pm | 7:00pm | 9:10pm</ShowTimes>
</Movie>
<Movie>
<Name>Yoo-Hoo, Mrs. Goldberg</Name>
<ShowTimes>2:10pm | 4:20pm | 7:10pm | 9:20pm</ShowTimes>
</Movie>
</Movies>
</Theater>
<Theater>
<Name>Regal Park Terrace Stadium 6</Name>
<Address>4289 Park Road, Charlotte, NC</Address>
<Movies>
<Movie>
<Rating>PG-13</Rating>
<Name>(500) Days of Summer</Name>
<RunningTime>1 hr 35 mins</RunningTime>
<ShowTimes>1:30pm | 3:50pm | 6:50pm | 9:30pm</ShowTimes>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>Extract</Name>
<RunningTime>1 hr 31 mins</RunningTime>
<ShowTimes>2:10pm | 4:30pm | 7:30pm | 9:45pm</ShowTimes>
</Movie>
<Movie>
<Rating>PG-13</Rating>
<Name>Paper Heart</Name>
<RunningTime>1 hr 28 mins</RunningTime>
<ShowTimes>4:50pm | 9:55pm</ShowTimes>
</Movie>
<Movie>
<Rating>G</Rating>
<Name>Ponyo</Name>
<RunningTime>1 hr 40 mins</RunningTime>
<ShowTimes>1:40pm | 4:05pm | 7:00pm | 9:25pm</ShowTimes>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>Taking Woodstock</Name>
<RunningTime>2 hrs 00 mins</RunningTime>
<ShowTimes>1:50pm | 4:35pm | 7:20pm | 10:05pm</ShowTimes>
</Movie>
<Movie>
<Rating>PG-13</Rating>
<Name>The Cove</Name>
<RunningTime>1 hr 34 mins</RunningTime>
<ShowTimes>1:55pm | 7:40pm</ShowTimes>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>The Hurt Locker</Name>
<RunningTime>2 hrs 07 mins</RunningTime>
<ShowTimes>1:20pm | 4:15pm | 7:10pm | 10:00pm</ShowTimes>
</Movie>
</Movies>
</Theater>
<Theater>
<Name>Regal Movies at Birkdale</Name>
<Address>16950 Birkdale Commons Pkwy, Huntersville, NC</Address>
<Movies>
<Movie>
<Rating>PG-13</Rating>
<Name>(500) Days of Summer</Name>
<RunningTime>1 hr 35 mins</RunningTime>
<ShowTimes>12:35pm | 2:35pm | 4:40pm | 7:20pm | 9:40pm</ShowTimes>
</Movie>
<Movie>
<Rating>PG-13</Rating>
<Name>All About Steve</Name>
<RunningTime>1 hr 39 mins</RunningTime>
</Movie>
<Movie>
<Rating>PG-13</Rating>
<Name>Carriers</Name>
<RunningTime>1 hr 24 mins</RunningTime>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>District 9</Name>
<RunningTime>1 hr 51 mins</RunningTime>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>Extract</Name>
<RunningTime>1 hr 31 mins</RunningTime>
</Movie>
<Movie>
<Rating>PG-13</Rating>
<Name>G.I. Joe: The Rise of Cobra</Name>
<RunningTime>1 hr 58 mins</RunningTime>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>Gamer</Name>
<RunningTime>1 hr 35 mins</RunningTime>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>Halloween II</Name>
<RunningTime>1 hr 45 mins</RunningTime>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>Inglourious Basterds</Name>
<RunningTime>2 hrs 32 mins</RunningTime>
</Movie>
<Movie>
<Rating>PG-13</Rating>
<Name>Julie &amp; Julia</Name>
<RunningTime>2 hrs 04 mins</RunningTime>
</Movie>
<Movie>
<Rating>G</Rating>
<Name>Ponyo</Name>
<RunningTime>1 hr 40 mins</RunningTime>
</Movie>
<Movie>
<Rating>PG</Rating>
<Name>Shorts</Name>
<RunningTime>1 hr 29 mins</RunningTime>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>Taking Woodstock</Name>
<RunningTime>2 hrs 00 mins</RunningTime>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>The Final Destination</Name>
<RunningTime>1 hr 22 mins</RunningTime>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>The Final Destination 3D</Name>
<RunningTime>1 hr 22 mins</RunningTime>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>The Hangover</Name>
<RunningTime>1 hr 39 mins</RunningTime>
</Movie>
<Movie>
<Rating>PG-13</Rating>
<Name>The Time Traveler’s Wife</Name>
<RunningTime>1 hr 47 mins</RunningTime>
</Movie>
</Movies>
</Theater>
<Theater>
<Name>Regal Starlight Cinema 14</Name>
<Address>11240 US Hwy 29, Charlotte, NC</Address>
<Movies>
<Movie>
<Rating>PG-13</Rating>
<Name>All About Steve</Name>
<RunningTime>1 hr 39 mins</RunningTime>
<ShowTimes>11:45am | 2:10pm | 4:35pm | 7:15pm | 9:40pm</ShowTimes>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>District 9</Name>
<RunningTime>1 hr 51 mins</RunningTime>
<ShowTimes>11:50am | 2:25pm | 4:55pm | 7:35pm | 10:05pm</ShowTimes>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>Extract</Name>
<RunningTime>1 hr 31 mins</RunningTime>
<ShowTimes>12:30pm | 2:55pm | 5:25pm | 7:50pm | 10:00pm</ShowTimes>
</Movie>
<Movie>
<Rating>PG</Rating>
<Name>G-Force</Name>
<RunningTime>1 hr 28 mins</RunningTime>
<ShowTimes>11:55am | 2:25pm | 4:40pm | 7:10pm | 9:35pm</ShowTimes>
</Movie>
<Movie>
<Rating>PG-13</Rating>
<Name>G.I. Joe: The Rise of Cobra</Name>
<RunningTime>1 hr 58 mins</RunningTime>
<ShowTimes>11:40am | 2:20pm | 5:00pm | 7:45pm | 10:25pm</ShowTimes>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>Gamer</Name>
<RunningTime>1 hr 35 mins</RunningTime>
<ShowTimes>11:50am | 2:15pm | 4:45pm | 7:20pm | 9:45pm</ShowTimes>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>Halloween II</Name>
<RunningTime>1 hr 45 mins</RunningTime>
<ShowTimes>12:00pm | 2:35pm | 5:10pm | 7:40pm | 10:15pm</ShowTimes>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>Inglourious Basterds</Name>
<RunningTime>2 hrs 32 mins</RunningTime>
<ShowTimes>11:40am | 2:55pm | 7:05pm | 10:20pm</ShowTimes>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>Orphan</Name>
<RunningTime>2 hrs 03 mins</RunningTime>
<ShowTimes>12:05pm | 2:50pm | 7:25pm | 10:10pm</ShowTimes>
</Movie>
<Movie>
<Rating>PG-13</Rating>
<Name>Post Grad</Name>
<RunningTime>1 hr 29 mins</RunningTime>
<ShowTimes>9:30pm</ShowTimes>
</Movie>
<Movie>
<Rating>PG</Rating>
<Name>Shorts</Name>
<RunningTime>1 hr 29 mins</RunningTime>
<ShowTimes>12:20pm | 2:40pm | 4:50pm | 7:00pm</ShowTimes>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>The Final Destination</Name>
<RunningTime>1 hr 22 mins</RunningTime>
<ShowTimes>12:15pm | 2:45pm | 5:20pm | 7:30pm | 9:50pm</ShowTimes>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>The Hangover</Name>
<RunningTime>1 hr 39 mins</RunningTime>
<ShowTimes>12:10pm | 2:40pm | 5:10pm | 7:55pm | 10:25pm</ShowTimes>
</Movie>
<Movie>
<Rating>PG-13</Rating>
<Name>The Time Traveler’s Wife</Name>
<RunningTime>1 hr 47 mins</RunningTime>
<ShowTimes>11:45am | 2:30pm | 5:05pm | 7:45pm | 10:15pm</ShowTimes>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>The Ugly Truth</Name>
<RunningTime>1 hr 35 mins</RunningTime>
<ShowTimes>12:25pm | 2:45pm | 5:15pm | 7:30pm | 9:55pm</ShowTimes>
</Movie>
</Movies>
</Theater>
<Theater>
<Name>Regal Phillips Place Stadium 10</Name>
<Address>6911 Phillips Place Ct., Charlotte, NC</Address>
<Movies>
<Movie>
<Rating>PG-13</Rating>
<Name>All About Steve</Name>
<RunningTime>1 hr 39 mins</RunningTime>
<ShowTimes>12:30pm | 2:50pm | 5:10pm | 7:30pm | 9:50pm</ShowTimes>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>District 9</Name>
<RunningTime>1 hr 51 mins</RunningTime>
<ShowTimes>12:15pm | 2:55pm | 5:25pm | 8:00pm | 10:35pm</ShowTimes>
</Movie>
<Movie>
<Rating>PG-13</Rating>
<Name>G.I. Joe: The Rise of Cobra</Name>
<RunningTime>1 hr 58 mins</RunningTime>
<ShowTimes>11:45am | 2:25pm | 5:05pm | 7:50pm | 10:30pm</ShowTimes>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>Gamer</Name>
<RunningTime>1 hr 35 mins</RunningTime>
<ShowTimes>11:50am | 2:15pm | 4:40pm | 7:00pm | 9:25pm</ShowTimes>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>Halloween II</Name>
<RunningTime>1 hr 45 mins</RunningTime>
<ShowTimes>12:00pm | 2:30pm | 5:00pm | 7:40pm | 10:10pm</ShowTimes>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>Inglourious Basterds</Name>
<RunningTime>2 hrs 32 mins</RunningTime>
<ShowTimes>12:10pm | 3:30pm | 6:45pm | 10:05pm</ShowTimes>
</Movie>
<Movie>
<Rating>PG-13</Rating>
<Name>Julie &amp; Julia</Name>
<RunningTime>2 hrs 04 mins</RunningTime>
<ShowTimes>1:00pm | 4:00pm | 7:15pm | 10:00pm</ShowTimes>
</Movie>
<Movie>
<Rating>PG</Rating>
<Name>Shorts</Name>
<RunningTime>1 hr 29 mins</RunningTime>
<ShowTimes>12:05pm | 2:20pm | 4:30pm</ShowTimes>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>The Final Destination</Name>
<RunningTime>1 hr 22 mins</RunningTime>
<ShowTimes>12:20pm | 2:45pm | 5:20pm | 7:25pm | 9:35pm</ShowTimes>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>The Hangover</Name>
<RunningTime>1 hr 39 mins</RunningTime>
<ShowTimes>10:15pm</ShowTimes>
</Movie>
<Movie>
<Rating>PG-13</Rating>
<Name>The Time Traveler’s Wife</Name>
<RunningTime>1 hr 47 mins</RunningTime>
<ShowTimes>11:55am | 2:35pm | 5:15pm | 7:45pm</ShowTimes>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>The Ugly Truth</Name>
<RunningTime>1 hr 35 mins</RunningTime>
<ShowTimes>7:10pm | 9:45pm</ShowTimes>
</Movie>
</Movies>
</Theater>
<Theater>
<Name>AMC Concord Mills 24</Name>
<Address>8241 Concord Mills Blvd, Concord, NC</Address>
<Movies>
<Movie>
<Rating>PG-13</Rating>
<Name>(500) Days of Summer</Name>
<RunningTime>1 hr 35 mins</RunningTime>
<ShowTimes>10:20am | 12:40pm | 3:00pm | 5:20pm | 7:40pm | 10:00pm</ShowTimes>
</Movie>
<Movie>
<Rating>PG</Rating>
<Name>Aliens in the Attic</Name>
<RunningTime>1 hr 26 mins</RunningTime>
<ShowTimes>10:10am | 12:25pm | 2:35pm | 4:55pm</ShowTimes>
</Movie>
<Movie>
<Rating>PG-13</Rating>
<Name>All About Steve</Name>
<RunningTime>1 hr 39 mins</RunningTime>
<ShowTimes>10:00am | 12:20pm | 2:45pm | 5:10pm | 7:55pm | 10:30pm</ShowTimes>
</Movie>
<Movie>
<Rating>PG-13</Rating>
<Name>Carriers</Name>
<RunningTime>1 hr 24 mins</RunningTime>
<ShowTimes>10:15am | 12:25pm | 2:35pm | 4:50pm | 7:05pm | 9:20pm</ShowTimes>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>District 9</Name>
<RunningTime>1 hr 51 mins</RunningTime>
<ShowTimes>2:30pm | 5:10pm | 7:50pm | 10:25pm</ShowTimes>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>Extract</Name>
<RunningTime>1 hr 31 mins</RunningTime>
<ShowTimes>10:45am | 1:10pm | 3:35pm | 6:00pm | 8:20pm | 10:40pm</ShowTimes>
</Movie>
<Movie>
<Rating>PG</Rating>
<Name>G-Force</Name>
<RunningTime>1 hr 28 mins</RunningTime>
<ShowTimes>10:25am | 12:45pm | 3:05pm | 5:25pm | 7:45pm</ShowTimes>
</Movie>
<Movie>
<Rating>PG-13</Rating>
<Name>G.I. Joe: The Rise of Cobra</Name>
<RunningTime>1 hr 58 mins</RunningTime>
<ShowTimes>11:45am | 2:30pm | 5:15pm | 8:00pm | 10:45pm</ShowTimes>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>Gamer</Name>
<RunningTime>1 hr 35 mins</RunningTime>
<ShowTimes>10:05am | 11:00pm | 12:25pm | 1:20pm | 2:50pm | 3:45pm | 5:15pm | 6:10pm | 7:45pm | 8:35pm | 10:10pm | 11:00pm</ShowTimes>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>Halloween II</Name>
<RunningTime>1 hr 45 mins</RunningTime>
<ShowTimes>10:35am | 12:10pm | 1:05pm | 2:45pm | 3:40pm | 5:20pm | 6:15pm | 7:55pm | 8:50pm | 10:30pm</ShowTimes>
</Movie>
<Movie>
<Rating>PG</Rating>
<Name>Harry Potter and the Half-Blood Prince</Name>
<RunningTime>2 hrs 33 mins</RunningTime>
<ShowTimes>12:20pm | 3:40pm | 7:00pm</ShowTimes>
</Movie>
<Movie>
<Rating>PG</Rating>
<Name>Ice Age: Dawn of the Dinosaurs</Name>
<RunningTime>1 hr 34 mins</RunningTime>
<ShowTimes>10:35am | 12:55pm | 3:15pm | 5:35pm</ShowTimes>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>Inglourious Basterds</Name>
<RunningTime>2 hrs 32 mins</RunningTime>
<ShowTimes>1:00pm | 4:20pm | 7:35pm | 10:55pm</ShowTimes>
</Movie>
<Movie>
<Rating>PG-13</Rating>
<Name>Julie &amp; Julia</Name>
<RunningTime>2 hrs 04 mins</RunningTime>
<ShowTimes>11:00am | 1:50pm | 4:40pm | 7:30pm | 10:20pm</ShowTimes>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>Old Partner</Name>
<RunningTime>2 hrs 03 mins</RunningTime>
<ShowTimes>10:30am | 12:30pm | 2:40pm | 4:50pm | 6:50pm | 8:50pm | 10:50pm</ShowTimes>
</Movie>
<Movie>
<Rating>PG-13</Rating>
<Name>Orphan</Name>
<RunningTime>1 hr 45 mins</RunningTime>
<ShowTimes>8:00pm | 10:50pm</ShowTimes>
</Movie>
<Movie>
<Rating>PG-13</Rating>
<Name>Play the Game</Name>
<RunningTime>1 hr 29 mins</RunningTime>
<ShowTimes>10:40am | 3:40pm</ShowTimes>
</Movie>
<Movie>
<Rating>PG</Rating>
<Name>Post Grad</Name>
<RunningTime>1 hr 29 mins</RunningTime>
<ShowTimes>10:05pm</ShowTimes>
</Movie>
<Movie>
<Rating>PG-13</Rating>
<Name>Shorts</Name>
<RunningTime>2 hrs 06 mins</RunningTime>
<ShowTimes>10:05am | 12:35pm | 2:50pm | 5:05pm | 7:25pm | 9:45pm</ShowTimes>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>Star Trek</Name>
<RunningTime>2 hrs 00 mins</RunningTime>
<ShowTimes>10:25pm</ShowTimes>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>Taking Woodstock</Name>
<RunningTime>1 hr 22 mins</RunningTime>
<ShowTimes>2:00pm | 4:50pm | 7:40pm | 10:35pm</ShowTimes>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>The Final Destination</Name>
<RunningTime>1 hr 39 mins</RunningTime>
<ShowTimes>10:00am | 12:10pm | 2:25pm | 4:30pm | 6:40pm | 8:55pm | 11:00pm | 12:40pm | 2:55pm | 5:00pm | 7:10pm | 9:25pm | 12:40pm | 2:55pm | 5:00pm | 7:10pm | 9:25pm</ShowTimes>
</Movie>
<Movie>
<Rating>PG-13</Rating>
<Name>The Hangover</Name>
<RunningTime>1 hr 48 mins</RunningTime>
<ShowTimes>1:25pm | 3:50pm | 6:20pm | 8:55pm</ShowTimes>
</Movie>
<Movie>
<Rating>PG-13</Rating>
<Name>The Proposal</Name>
<RunningTime>1 hr 47 mins</RunningTime>
<ShowTimes>7:05pm | 9:40pm</ShowTimes>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>The Time Traveler’s Wife</Name>
<RunningTime>1 hr 35 mins</RunningTime>
<ShowTimes>11:40am | 2:20pm | 5:00pm | 7:35pm | 10:10pm</ShowTimes>
</Movie>
<Movie>
<Name>The Ugly Truth</Name>
<ShowTimes>1:15pm | 6:20pm | 8:40pm | 11:00pm</ShowTimes>
</Movie>
</Movies>
</Theater>
<Theater>
<Name>Ayrsley Grand 14</Name>
<Address>9110 Kings Parade Blvd., Charlotte, NC</Address>
<Movies>
<Movie>
<Rating>PG-13</Rating>
<Name>All About Steve</Name>
<RunningTime>1 hr 39 mins</RunningTime>
<ShowTimes>1:40pm | 4:00pm | 7:20pm | 9:25pm</ShowTimes>
</Movie>
<Movie>
<Rating>PG-13</Rating>
<Name>Carriers</Name>
<RunningTime>1 hr 24 mins</RunningTime>
<ShowTimes>1:50pm | 3:40pm | 5:30pm | 7:35pm | 9:30pm</ShowTimes>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>District 9</Name>
<RunningTime>1 hr 51 mins</RunningTime>
<ShowTimes>1:20pm | 3:50pm | 7:25pm | 9:45pm</ShowTimes>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>Extract</Name>
<RunningTime>1 hr 31 mins</RunningTime>
<ShowTimes>1:20pm | 3:20pm | 5:20pm | 7:30pm | 9:40pm</ShowTimes>
</Movie>
<Movie>
<Rating>PG</Rating>
<Name>G-Force</Name>
<RunningTime>1 hr 28 mins</RunningTime>
<ShowTimes>1:10pm | 3:00pm | 5:00pm</ShowTimes>
</Movie>
<Movie>
<Rating>PG-13</Rating>
<Name>G.I. Joe: The Rise of Cobra</Name>
<RunningTime>1 hr 58 mins</RunningTime>
<ShowTimes>1:00pm | 3:40pm | 7:00pm | 9:30pm</ShowTimes>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>Gamer</Name>
<RunningTime>1 hr 35 mins</RunningTime>
<ShowTimes>1:30pm | 3:40pm | 5:40pm | 7:45pm | 9:50pm</ShowTimes>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>Halloween II</Name>
<RunningTime>1 hr 45 mins</RunningTime>
<ShowTimes>1:45pm | 4:15pm | 7:40pm | 9:50pm</ShowTimes>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>Inglourious Basterds</Name>
<RunningTime>2 hrs 32 mins</RunningTime>
<ShowTimes>1:45pm | 5:00pm | 8:15pm</ShowTimes>
</Movie>
<Movie>
<Rating>PG-13</Rating>
<Name>Julie &amp; Julia</Name>
<RunningTime>2 hrs 04 mins</RunningTime>
<ShowTimes>7:10pm | 9:40pm</ShowTimes>
</Movie>
<Movie>
<Rating>PG</Rating>
<Name>Shorts</Name>
<RunningTime>1 hr 29 mins</RunningTime>
<ShowTimes>1:00pm | 3:00pm | 5:00pm | 7:15pm | 9:15pm</ShowTimes>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>Taking Woodstock</Name>
<RunningTime>2 hrs 00 mins</RunningTime>
<ShowTimes>1:40pm | 4:15pm | 7:20pm | 9:50pm</ShowTimes>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>The Final Destination 3D</Name>
<RunningTime>1 hr 22 mins</RunningTime>
<ShowTimes>1:15pm | 3:10pm | 5:00pm | 7:10pm | 9:00pm</ShowTimes>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>The Hangover</Name>
<RunningTime>1 hr 39 mins</RunningTime>
<ShowTimes>4:00pm | 9:45pm</ShowTimes>
</Movie>
<Movie>
<Rating>PG-13</Rating>
<Name>The Time Traveler’s Wife</Name>
<RunningTime>1 hr 47 mins</RunningTime>
<ShowTimes>1:30pm | 4:20pm | 7:00pm | 9:20pm</ShowTimes>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>The Ugly Truth</Name>
<RunningTime>1 hr 35 mins</RunningTime>
<ShowTimes>1:50pm | 7:30pm</ShowTimes>
</Movie>
</Movies>
</Theater>
<Theater>
<Name>AMC Carolina Pavilion 22</Name>
<Address>9541 South Boulevard, Charlotte, NC</Address>
<Movies>
<Movie>
<Rating>PG-13</Rating>
<Name>(500) Days of Summer</Name>
<RunningTime>1 hr 35 mins</RunningTime>
<ShowTimes>6:50pm | 9:20pm</ShowTimes>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>A Perfect Getaway</Name>
<RunningTime>1 hr 37 mins</RunningTime>
<ShowTimes>4:40pm | 10:45pm</ShowTimes>
</Movie>
<Movie>
<Rating>PG</Rating>
<Name>Aliens in the Attic</Name>
<RunningTime>1 hr 26 mins</RunningTime>
<ShowTimes>1:10pm | 3:35pm</ShowTimes>
</Movie>
<Movie>
<Rating>PG-13</Rating>
<Name>All About Steve</Name>
<RunningTime>1 hr 39 mins</RunningTime>
<ShowTimes>11:15am | 1:55pm | 4:20pm | 7:15pm | 9:55pm</ShowTimes>
</Movie>
<Movie>
<Rating>PG</Rating>
<Name>Bandslam</Name>
<RunningTime>1 hr 51 mins</RunningTime>
<ShowTimes>12:45pm | 4:25pm</ShowTimes>
</Movie>
<Movie>
<Rating>PG-13</Rating>
<Name>Carriers</Name>
<RunningTime>1 hr 24 mins</RunningTime>
<ShowTimes>11:10am | 1:25pm | 3:30pm | 5:45pm | 8:15pm | 10:30pm</ShowTimes>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>District 9</Name>
<RunningTime>1 hr 51 mins</RunningTime>
<ShowTimes>11:00am | 1:45pm | 4:30pm | 7:10pm | 9:50pm</ShowTimes>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>Extract</Name>
<RunningTime>1 hr 31 mins</RunningTime>
<ShowTimes>10:45am | 12:55pm | 3:10pm | 5:35pm | 8:00pm | 10:40pm</ShowTimes>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>Funny People</Name>
<RunningTime>2 hrs 26 mins</RunningTime>
<ShowTimes>6:25pm | 9:05pm</ShowTimes>
</Movie>
<Movie>
<Rating>PG</Rating>
<Name>G-Force</Name>
<RunningTime>1 hr 28 mins</RunningTime>
<ShowTimes>11:20am | 1:40pm | 3:50pm</ShowTimes>
</Movie>
<Movie>
<Rating>PG-13</Rating>
<Name>G.I. Joe: The Rise of Cobra</Name>
<RunningTime>1 hr 58 mins</RunningTime>
<ShowTimes>11:25am | 2:25pm | 5:10pm | 7:50pm | 10:35pm</ShowTimes>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>Gamer</Name>
<RunningTime>1 hr 35 mins</RunningTime>
<ShowTimes>11:30am | 2:05pm | 4:50pm | 7:35pm | 10:15pm</ShowTimes>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>Halloween II</Name>
<RunningTime>1 hr 45 mins</RunningTime>
<ShowTimes>11:45am | 2:30pm | 5:00pm | 7:30pm | 10:00pm</ShowTimes>
</Movie>
<Movie>
<Rating>PG</Rating>
<Name>Harry Potter and the Half-Blood Prince</Name>
<RunningTime>2 hrs 33 mins</RunningTime>
<ShowTimes>10:55am | 2:15pm | 5:25pm | 8:50pm</ShowTimes>
</Movie>
<Movie>
<Rating>PG</Rating>
<Name>Ice Age: Dawn of the Dinosaurs</Name>
<RunningTime>1 hr 34 mins</RunningTime>
<ShowTimes>11:35am | 1:50pm | 4:05pm</ShowTimes>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>Inglourious Basterds</Name>
<RunningTime>2 hrs 32 mins</RunningTime>
<ShowTimes>10:45am | 2:00pm | 5:30pm | 7:00pm | 8:45pm | 10:25pm</ShowTimes>
</Movie>
<Movie>
<Rating>PG-13</Rating>
<Name>Julie &amp; Julia</Name>
<RunningTime>2 hrs 04 mins</RunningTime>
<ShowTimes>10:50am | 1:35pm | 4:25pm | 7:25pm | 10:10pm</ShowTimes>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>Orphan</Name>
<RunningTime>2 hrs 03 mins</RunningTime>
<ShowTimes>1:05pm | 7:45pm</ShowTimes>
</Movie>
<Movie>
<Rating>PG-13</Rating>
<Name>Post Grad</Name>
<RunningTime>1 hr 29 mins</RunningTime>
<ShowTimes>12:30pm</ShowTimes>
</Movie>
<Movie>
<Rating>PG</Rating>
<Name>Shorts</Name>
<RunningTime>1 hr 29 mins</RunningTime>
<ShowTimes>11:00am | 1:15pm | 3:40pm | 5:50pm | 8:05pm | 10:20pm</ShowTimes>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>Spread</Name>
<RunningTime>1 hr 37 mins</RunningTime>
<ShowTimes>7:20pm | 9:45pm</ShowTimes>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>Taking Woodstock</Name>
<RunningTime>2 hrs 00 mins</RunningTime>
<ShowTimes>3:20pm | 6:40pm | 9:30pm</ShowTimes>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>The Final Destination</Name>
<RunningTime>1 hr 22 mins</RunningTime>
<ShowTimes>11:05am | 12:20pm | 1:20pm | 2:30pm | 3:25pm | 4:45pm | 5:40pm | 7:05pm | 8:10pm | 9:15pm | 10:30pm</ShowTimes>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>The Goods: Live Hard. Sell Hard.</Name>
<RunningTime>1 hr 29 mins</RunningTime>
<ShowTimes>6:35pm | 9:05pm</ShowTimes>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>The Hangover</Name>
<RunningTime>1 hr 39 mins</RunningTime>
<ShowTimes>6:55pm | 9:25pm</ShowTimes>
</Movie>
<Movie>
<Rating>PG-13</Rating>
<Name>The Time Traveler’s Wife</Name>
<RunningTime>1 hr 47 mins</RunningTime>
<ShowTimes>1:00pm | 4:10pm | 6:45pm | 9:35pm</ShowTimes>
</Movie>
<Movie>
<Rating>PG-13</Rating>
<Name>Transformers: Revenge of the Fallen</Name>
<RunningTime>2 hrs 29 mins</RunningTime>
<ShowTimes>11:40am | 3:15pm</ShowTimes>
</Movie>
<Movie>
<Rating>PG</Rating>
<Name>Up</Name>
<RunningTime>1 hr 29 mins</RunningTime>
<ShowTimes>11:50am | 2:35pm | 4:55pm</ShowTimes>
</Movie>
</Movies>
</Theater>
<Theater>
<Name>Cinemark Movies 10</Name>
<Address>9508 Northeast Ct, Matthews, NC</Address>
<Movies>
<Movie>
<Rating>PG</Rating>
<Name>Bandslam</Name>
<RunningTime>1 hr 51 mins</RunningTime>
<ShowTimes>1:40pm | 4:10pm | 7:15pm | 9:45pm</ShowTimes>
</Movie>
<Movie>
<Rating>PG</Rating>
<Name>Ice Age: Dawn of the Dinosaurs</Name>
<RunningTime>1 hr 34 mins</RunningTime>
<ShowTimes>12:45pm | 1:55pm | 3:05pm | 4:15pm | 5:30pm | 6:35pm | 7:45pm | 9:00pm | 10:05pm</ShowTimes>
</Movie>
<Movie>
<Rating>PG-13</Rating>
<Name>My Sister’s Keeper</Name>
<RunningTime>1 hr 48 mins</RunningTime>
<ShowTimes>1:45pm | 4:20pm | 7:25pm | 9:55pm</ShowTimes>
</Movie>
<Movie>
<Rating>PG</Rating>
<Name>Night at the Museum: Battle of the Smithsonian</Name>
<RunningTime>1 hr 45 mins</RunningTime>
<ShowTimes>12:55pm | 3:25pm | 5:55pm | 8:15pm</ShowTimes>
</Movie>
<Movie>
<Rating>PG-13</Rating>
<Name>Star Trek</Name>
<RunningTime>2 hrs 06 mins</RunningTime>
<ShowTimes>1:00pm | 7:00pm</ShowTimes>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>The Taking of Pelham 123</Name>
<RunningTime>1 hr 46 mins</RunningTime>
<ShowTimes>3:50pm | 9:50pm</ShowTimes>
</Movie>
<Movie>
<Rating>PG-13</Rating>
<Name>Transformers: Revenge of the Fallen</Name>
<RunningTime>2 hrs 29 mins</RunningTime>
<ShowTimes>12:30pm | 2:05pm | 3:40pm | 5:15pm | 6:50pm | 8:25pm | 10:00pm</ShowTimes>
</Movie>
<Movie>
<Rating>PG</Rating>
<Name>Up</Name>
<RunningTime>1 hr 29 mins</RunningTime>
<ShowTimes>1:05pm | 2:15pm | 3:30pm | 4:35pm | 5:50pm | 6:55pm | 8:10pm | 9:15pm</ShowTimes>
</Movie>
</Movies>
</Theater>
<Theater>
<Name>Regal Arboretum Stadium 12</Name>
<Address>8008 Providence Road, Charlotte, NC</Address>
<Movies>
<Movie>
<Rating>PG-13</Rating>
<Name>All About Steve</Name>
<RunningTime>1 hr 39 mins</RunningTime>
<ShowTimes>1:20pm | 4:20pm | 7:30pm | 9:55pm</ShowTimes>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>District 9</Name>
<RunningTime>1 hr 51 mins</RunningTime>
<ShowTimes>1:10pm | 4:25pm | 7:25pm | 10:00pm</ShowTimes>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>Extract</Name>
<RunningTime>1 hr 31 mins</RunningTime>
<ShowTimes>1:45pm | 4:45pm | 7:45pm | 10:30pm</ShowTimes>
</Movie>
<Movie>
<Rating>PG-13</Rating>
<Name>G.I. Joe: The Rise of Cobra</Name>
<RunningTime>1 hr 58 mins</RunningTime>
<ShowTimes>1:15pm | 4:15pm | 7:10pm | 9:50pm</ShowTimes>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>Gamer</Name>
<RunningTime>1 hr 35 mins</RunningTime>
<ShowTimes>1:40pm | 4:40pm | 7:50pm | 10:25pm</ShowTimes>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>Halloween II</Name>
<RunningTime>1 hr 45 mins</RunningTime>
<ShowTimes>1:30pm | 4:30pm | 7:40pm | 10:10pm</ShowTimes>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>Inglourious Basterds</Name>
<RunningTime>2 hrs 32 mins</RunningTime>
<ShowTimes>2:00pm | 7:00pm | 10:15pm</ShowTimes>
</Movie>
<Movie>
<Rating>PG-13</Rating>
<Name>Julie &amp; Julia</Name>
<RunningTime>2 hrs 04 mins</RunningTime>
<ShowTimes>1:05pm | 4:00pm | 7:20pm | 10:05pm</ShowTimes>
</Movie>
<Movie>
<Rating>PG-13</Rating>
<Name>Post Grad</Name>
<RunningTime>1 hr 29 mins</RunningTime>
<ShowTimes>9:30pm</ShowTimes>
</Movie>
<Movie>
<Rating>PG</Rating>
<Name>Shorts</Name>
<RunningTime>1 hr 29 mins</RunningTime>
<ShowTimes>1:25pm | 4:10pm | 7:05pm</ShowTimes>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>The Final Destination</Name>
<RunningTime>1 hr 22 mins</RunningTime>
<ShowTimes>1:50pm | 4:50pm | 7:35pm | 9:40pm</ShowTimes>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>The Hangover</Name>
<RunningTime>1 hr 39 mins</RunningTime>
<ShowTimes>1:35pm | 4:35pm | 7:55pm | 10:20pm</ShowTimes>
</Movie>
<Movie>
<Rating>PG-13</Rating>
<Name>The Time Traveler’s Wife</Name>
<RunningTime>1 hr 47 mins</RunningTime>
<ShowTimes>1:00pm | 4:05pm | 7:15pm | 9:45pm</ShowTimes>
</Movie>
</Movies>
</Theater>
<Theater>
<Name>Regal Movies @ Franklin Square</Name>
<Address>3778 E. Franklin Boulevard, Gastonia, NC</Address>
<Movies>
<Movie>
<Rating>PG-13</Rating>
<Name>All About Steve</Name>
<RunningTime>1 hr 39 mins</RunningTime>
<ShowTimes>12:20pm | 2:40pm | 5:05pm | 7:30pm | 9:55pm</ShowTimes>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>District 9</Name>
<RunningTime>1 hr 51 mins</RunningTime>
<ShowTimes>11:55am | 2:30pm | 5:00pm | 7:45pm | 10:20pm</ShowTimes>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>Extract</Name>
<RunningTime>1 hr 31 mins</RunningTime>
<ShowTimes>12:35pm | 2:50pm | 5:10pm | 7:20pm | 9:40pm</ShowTimes>
</Movie>
<Movie>
<Rating>PG</Rating>
<Name>G-Force</Name>
<RunningTime>1 hr 28 mins</RunningTime>
<ShowTimes>11:50am | 2:15pm | 4:40pm | 7:10pm | 9:30pm</ShowTimes>
</Movie>
<Movie>
<Rating>PG-13</Rating>
<Name>G.I. Joe: The Rise of Cobra</Name>
<RunningTime>1 hr 58 mins</RunningTime>
<ShowTimes>1:00pm | 4:20pm | 7:25pm | 10:15pm</ShowTimes>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>Gamer</Name>
<RunningTime>1 hr 35 mins</RunningTime>
<ShowTimes>12:25pm | 2:45pm | 5:20pm | 7:40pm | 10:05pm</ShowTimes>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>Halloween II</Name>
<RunningTime>1 hr 45 mins</RunningTime>
<ShowTimes>12:10pm | 2:35pm | 5:25pm | 8:00pm | 10:30pm</ShowTimes>
</Movie>
<Movie>
<Rating>PG</Rating>
<Name>Harry Potter and the Half-Blood Prince</Name>
<RunningTime>2 hrs 33 mins</RunningTime>
<ShowTimes>12:00pm | 3:15pm | 6:45pm | 10:00pm</ShowTimes>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>Inglourious Basterds</Name>
<RunningTime>2 hrs 32 mins</RunningTime>
<ShowTimes>11:45am | 3:00pm | 6:30pm | 9:45pm</ShowTimes>
</Movie>
<Movie>
<Rating>PG-13</Rating>
<Name>Julie &amp; Julia</Name>
<RunningTime>2 hrs 04 mins</RunningTime>
<ShowTimes>1:15pm | 4:15pm | 7:05pm | 9:50pm</ShowTimes>
</Movie>
<Movie>
<Rating>PG</Rating>
<Name>Shorts</Name>
<RunningTime>1 hr 29 mins</RunningTime>
<ShowTimes>12:15pm | 9:20pm | 2:25pm | 4:45pm | 7:00pm</ShowTimes>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>The Final Destination</Name>
<RunningTime>1 hr 22 mins</RunningTime>
<ShowTimes>12:05pm | 12:50pm | 2:10pm | 2:55pm | 4:50pm | 5:30pm | 7:15pm | 7:50pm | 9:25pm | 10:10pm</ShowTimes>
</Movie>
<Movie>
<Rating>PG-13</Rating>
<Name>The Time Traveler’s Wife</Name>
<RunningTime>1 hr 47 mins</RunningTime>
<ShowTimes>1:05pm | 4:25pm | 7:55pm | 10:25pm</ShowTimes>
</Movie>
<Movie>
<Name>Jobs</Name>
</Movie>
</Movies>
</Theater>
</GetTheatersAndMoviesResult>
</GetTheatersAndMoviesResponse>
</soap:Body>
</soap:Envelope>

Step 2. Create the query and define the view.  For this XML document we have use the XQuery FLWOR expression to create a flattened version of the original document.  We do this by taking the Theater tag and it’s immediate child elements and the Movie tag and it’s child elements and making them all attributes of the Movie tags that are the children of each Theater tag.  Giving us a  flattened structure like:

<Movie theater=”blah” address=”blah” name=”blah”  rating=”blah” runtime=”blah” showtimes=”blah></Movie>

Here is the entire view definition with the XMLTable function and XQuery FLWOR expression:

CREATE OR REPLACE VIEW LOCAL_MOVIES_VW AS
SELECT
theatre,
address,
movie,
rating,
runtime,
showtimes
FROM
XMLTable(XMLNamespaces(‘http://www.ignyte.com/whatsshowing’ AS “x”),
‘for $i in $xml//x:Theater
for $x in $i//x:Movie
return <Movie theater=”{$i/x:Name/text()}”
address=”{$i/x:Address/text()}”
name=”{$x/x:Name/text()}”
rating=”{$x/x:Rating/text()}”
runtime=”{$x/x:RunningTime/text()}”
showtimes=”{$x/x:ShowTimes/text()}”></Movie>’
PASSING getMovieListWS  as “xml”
COLUMNS
theatre          VARCHAR2(100) PATH ‘/Movie/@theater’,
address          VARCHAR2(100) PATH ‘/Movie/@address’,
movie            VARCHAR2(100) PATH ‘/Movie/@name’,
rating           VARCHAR2(100) PATH ‘/Movie/@rating’,
runtime          VARCHAR2(100) PATH ‘/Movie/@runtime’,
showtimes        VARCHAR2(100) PATH ‘/Movie/@showtimes’) a
/

Now, we can access the data provided by the web service by simply executing a SQL statement against our newly defined view.

Wrapping It up …

Exposing web services as a view is a great way to take data from non-traditional sources and include it directly into any existing data model.  As always … if you have any questions, please feel free to contact me.

PL/SQL Web Service Utility: Accessing Web Services with PL/SQL is Simple!

Wednesday, September 2nd, 2009

This entry showcases a PL/SQL package called WebServiceUtils that makes accessing a web service from with the Oracle database very simple.  The package makes use of Tim Hall’s SOAP_API PL/SQL package (updated by me to get the SOAP response as a CLOB instead of a VARCHAR2) to do the SOAP encoding and processing.  The WebServiceUtils package puts a user friendly layer over the SOAP_API.    The WebServiceUtils package (here after known as the “utils” package) provides three structures (2 record types and 1 collection).  The two record types are:

  • service_definition_type – Contains attributes related to the service you are trying to call.
  • service_param_type – attributes represent service parameter information.

(The collection) service_param_list is a collection of service_param_type.  The following code block contains these type (and collection) definitions (also notice the constants for SOAP 1.0 and SOAP 1.2 style tags):

– Public Objects/Types

SOAP_TAG_11 CONSTANT VARCHAR2(8) := ‘SOAP-ENV’;
SOAP_TAG_12 CONSTANT VARCHAR2(7) := ‘soapenv’;

– Type allowing developer to define a web service parameter name,data
TYPE service_param_type IS RECORD(
name VARCHAR2(100),
data_type VARCHAR2(100),
value VARCHAR2(1000)
);

– Collection of SERVICE_PARAM Type allowing developer to bundle service params.
TYPE service_param_list IS TABLE OF service_param_type;

– Type that allows developer to create service end point definition for generic exection of service
TYPE service_definition_type IS RECORD(
service_name VARCHAR2(100),
service_url VARCHAR2(100),
soap_tag VARCHAR2(10),
service_action_url VARCHAR2(200),
service_ns VARCHAR2(200),
service_params service_param_list,
result_ns VARCHAR2(200),
result_target VARCHAR2(200)
);

The util package contains a function called executeWebService that accepts a service_definition_type as it’s only parameter and returns a  CLOB (which can be converted to an XMLType).  The util package also contains a procedure called addParamToCollection that accepts two parameters, service_param_list and service_param_type.  The addParamToCollection procedure simply extends the passed collection object and places the parameter type object into it.

The code (including the SOAP_API package and examples) can be downloaded  here:WebServiceUtils.zip

Lets take a look at an example (included in the download above) …

This example demonstrates how connect to the a public web service (provided by www.ignyte.com) that will return a list of movie theaters given a zipcode and a radius of miles:

/* Movie Locations Service */

DECLARE

v_service_def WebServiceUtils.SERVICE_DEFINITION_TYPE;
v_param WebServiceUtils.service_param_type;
v_param_list WebServiceUtils.service_param_list := WebServiceUtils.service_param_list();

BEGIN

v_service_def.service_name := ‘GetTheatersAndMovies’;
v_service_def.service_url := ‘http://www.ignyte.com/webservices/ignyte.whatsshowing.webservice/moviefunctions.asmx’;
v_service_def.service_action_url := ‘http://www.ignyte.com/whatsshowing/GetTheatersAndMovies’;
v_service_def.service_ns := ‘http://www.ignyte.com/whatsshowing’;

v_param.name := ‘zipCode’;
v_param.data_type := ‘s:string’;
v_param.value := ’28216′;

WebServiceUtils.addParamToCollection(v_param_list,v_param);

v_param.name := ‘radius’;
v_param.data_type := ‘s:int’;
v_param.value := ’5′;

WebServiceUtils.addParamToCollection(v_param_list,v_param);

v_service_def.service_params := v_param_list;

DBMS_OUTPUT.PUT_LINE(substr(WebServiceUtils.executeWebService(v_service_def),1,20000));

END;
/

The result returned by the code above is ( without the substr):

<soap:Envelope xmlns:soap=”http://www.w3.org/2003/05/soap-envelope” xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” xmlns:xsd=”http://www.w3.org/2001/XMLSchema”>
<soap:Body>
<GetTheatersAndMoviesResponse xmlns=”http://www.ignyte.com/whatsshowing”>
<GetTheatersAndMoviesResult>
<Theater>
<Name>AMC Northlake 14</Name>
<Address>7325 Northlake Mall Drive, Charlotte, NC</Address>
<Movies>
<Movie>
<Rating>R</Rating>
<Name>District 9</Name>
<RunningTime>1 hr 51 mins</RunningTime>
<ShowTimes>1:50pm | 4:40pm | 7:30pm | 10:20pm</ShowTimes>
</Movie>
<Movie>
<Rating>PG</Rating>
<Name>G-Force</Name>
<RunningTime>1 hr 28 mins</RunningTime>
<ShowTimes>11:55am | 2:10pm | 4:20pm | 6:30pm</ShowTimes>
</Movie>
<Movie>
<Rating>PG-13</Rating>
<Name>G.I. Joe: The Rise of Cobra</Name>
<RunningTime>1 hr 58 mins</RunningTime>
<ShowTimes>1:20pm | 4:10pm | 7:00pm | 9:50pm</ShowTimes>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>Halloween II</Name>
<RunningTime>1 hr 45 mins</RunningTime>
<ShowTimes>12:00pm | 2:30pm | 5:20pm | 7:50pm | 10:30pm</ShowTimes>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>Inglourious Basterds</Name>
<RunningTime>2 hrs 32 mins</RunningTime>
<ShowTimes>11:55am | 2:30pm | 3:10pm | 6:00pm | 6:30pm | 9:15pm | 9:45pm</ShowTimes>
</Movie>
<Movie>
<Rating>PG-13</Rating>
<Name>Julie &amp; Julia</Name>
<RunningTime>2 hrs 04 mins</RunningTime>
<ShowTimes>12:10pm | 3:15pm | 6:20pm | 9:20pm</ShowTimes>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>Orphan</Name>
<RunningTime>2 hrs 03 mins</RunningTime>
<ShowTimes>9:00pm</ShowTimes>
</Movie>
<Movie>
<Rating>PG-13</Rating>
<Name>Post Grad</Name>
<RunningTime>1 hr 29 mins</RunningTime>
<ShowTimes>12:30pm | 3:00pm | 5:20pm | 7:40pm</ShowTimes>
</Movie>
<Movie>
<Rating>PG</Rating>
<Name>Shorts</Name>
<RunningTime>1 hr 29 mins</RunningTime>
<ShowTimes>12:00pm | 2:10pm | 4:30pm | 7:10pm</ShowTimes>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>Taking Woodstock</Name>
<RunningTime>2 hrs 00 mins</RunningTime>
<ShowTimes>1:20pm | 4:20pm | 7:15pm | 10:10pm</ShowTimes>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>The Final Destination</Name>
<RunningTime>1 hr 22 mins</RunningTime>
<ShowTimes>12:20pm | 2:40pm | 5:00pm | 7:20pm | 9:40pm | 1:00pm | 3:20pm | 5:40pm | 8:00pm | 10:20pm</ShowTimes>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>The Goods: Live Hard. Sell Hard.</Name>
<RunningTime>1 hr 29 mins</RunningTime>
<ShowTimes>12:40pm | 3:00pm | 5:30pm | 8:00pm | 10:15pm</ShowTimes>
</Movie>
<Movie>
<Rating>PG-13</Rating>
<Name>The Time Traveler’s Wife</Name>
<RunningTime>1 hr 47 mins</RunningTime>
<ShowTimes>1:30pm | 4:20pm | 7:10pm | 9:50pm</ShowTimes>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>The Ugly Truth</Name>
<RunningTime>1 hr 35 mins</RunningTime>
<ShowTimes>10:00pm</ShowTimes>
</Movie>
</Movies>
</Theater>
<Theater>
<Name>Observer Omnimax Theatre</Name>
<Address>301 North Tryon Street, Charlotte, NC</Address>
<Movies>
<Movie>
<Rating>G</Rating>
<Name>Grand Canyon Adventure: River at Risk</Name>
<RunningTime>0 hrs 35 mins</RunningTime>
<ShowTimes>11:00am | 2:00pm</ShowTimes>
</Movie>
<Movie>
<Name>Under the Sea 3D</Name>
<ShowTimes>10:00am | 12:00pm | 1:00pm | 3:00pm | 4:00pm</ShowTimes>
</Movie>
</Movies>
</Theater>
<Theater>
<Name>Epicentre Theater 5</Name>
<Address>210 E Trade St., Charlotte, NC</Address>
<Movies>
<Movie>
<Rating>R</Rating>
<Name>District 9</Name>
<RunningTime>1 hr 51 mins</RunningTime>
<ShowTimes>12:15pm | 3:00pm | 6:20pm | 9:20pm</ShowTimes>
</Movie>
<Movie>
<Rating>PG-13</Rating>
<Name>G.I. Joe: The Rise of Cobra</Name>
<RunningTime>1 hr 58 mins</RunningTime>
<ShowTimes>12:30pm | 3:30pm | 6:40pm | 9:30pm</ShowTimes>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>In the Loop</Name>
<RunningTime>2 hrs 32 mins</RunningTime>
<ShowTimes>12:10pm | 6:15pm</ShowTimes>
</Movie>
<Movie>
<Rating>PG-13</Rating>
<Name>Inglourious Basterds</Name>
<RunningTime>2 hrs 04 mins</RunningTime>
<ShowTimes>12:00pm | 3:15pm | 6:25pm | 9:25pm</ShowTimes>
</Movie>
<Movie>
<Rating>PG-13</Rating>
<Name>Julie &amp; Julia</Name>
<RunningTime>1 hr 47 mins</RunningTime>
<ShowTimes>3:10pm | 9:10pm</ShowTimes>
</Movie>
<Movie>
<Name>The Time Traveler’s Wife</Name>
<ShowTimes>1:00pm | 4:10pm | 6:50pm | 9:55pm</ShowTimes>
</Movie>
</Movies>
</Theater>
<Theater>
<Name>Regal Manor Theatre</Name>
<Address>607 Providence Road, Charlotte, NC</Address>
<Movies>
<Movie>
<Rating>PG-13</Rating>
<Name>Adam</Name>
<RunningTime>1 hr 37 mins</RunningTime>
<ShowTimes>2:00pm | 4:15pm | 7:00pm | 9:15pm</ShowTimes>
</Movie>
<Movie>
<Rating>G</Rating>
<Name>Ponyo</Name>
<RunningTime>1 hr 40 mins</RunningTime>
<ShowTimes>2:10pm | 4:30pm | 7:10pm | 9:20pm</ShowTimes>
</Movie>
</Movies>
</Theater>
<Theater>
<Name>Regal Park Terrace Stadium 6</Name>
<Address>4289 Park Road, Charlotte, NC</Address>
<Movies>
<Movie>
<Rating>PG-13</Rating>
<Name>(500) Days of Summer</Name>
<RunningTime>1 hr 35 mins</RunningTime>
<ShowTimes>1:30pm | 3:50pm | 6:50pm | 9:30pm</ShowTimes>
</Movie>
<Movie>
<Rating>PG-13</Rating>
<Name>Paper Heart</Name>
<RunningTime>1 hr 28 mins</RunningTime>
<ShowTimes>2:00pm | 4:50pm | 7:40pm | 9:50pm</ShowTimes>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>Revanche</Name>
<RunningTime>2 hrs 00 mins</RunningTime>
<ShowTimes>1:40pm | 4:20pm | 7:00pm | 9:40pm</ShowTimes>
</Movie>
<Movie>
<Rating>PG-13</Rating>
<Name>Taking Woodstock</Name>
<RunningTime>1 hr 34 mins</RunningTime>
<ShowTimes>2:05pm | 4:40pm | 7:30pm | 10:05pm</ShowTimes>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>The Cove</Name>
<RunningTime>2 hrs 07 mins</RunningTime>
<ShowTimes>1:50pm | 4:30pm | 7:20pm | 9:45pm</ShowTimes>
</Movie>
<Movie>
<Name>The Hurt Locker</Name>
<ShowTimes>1:20pm | 4:15pm | 7:10pm | 10:00pm</ShowTimes>
</Movie>
</Movies>
</Theater>
<Theater>
<Name>Regal Movies at Birkdale</Name>
<Address>16950 Birkdale Commons Pkwy, Huntersville, NC</Address>
<Movies>
<Movie>
<Rating>PG-13</Rating>
<Name>(500) Days of Summer</Name>
<RunningTime>1 hr 35 mins</RunningTime>
<ShowTimes>12:50pm | 3:00pm | 5:15pm | 7:45pm | 10:15pm</ShowTimes>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>District 9</Name>
<RunningTime>1 hr 51 mins</RunningTime>
</Movie>
<Movie>
<Rating>PG</Rating>
<Name>G-Force</Name>
<RunningTime>1 hr 28 mins</RunningTime>
</Movie>
<Movie>
<Rating>PG-13</Rating>
<Name>G.I. Joe: The Rise of Cobra</Name>
<RunningTime>1 hr 58 mins</RunningTime>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>Halloween II</Name>
<RunningTime>1 hr 45 mins</RunningTime>
</Movie>
<Movie>
<Rating>PG</Rating>
<Name>Harry Potter and the Half-Blood Prince</Name>
<RunningTime>2 hrs 33 mins</RunningTime>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>Inglourious Basterds</Name>
<RunningTime>2 hrs 32 mins</RunningTime>
</Movie>
<Movie>
<Rating>PG-13</Rating>
<Name>Julie &amp; Julia</Name>
<RunningTime>2 hrs 04 mins</RunningTime>
</Movie>
<Movie>
<Rating>G</Rating>
<Name>Ponyo</Name>
<RunningTime>1 hr 40 mins</RunningTime>
</Movie>
<Movie>
<Rating>PG-13</Rating>
<Name>Post Grad</Name>
<RunningTime>1 hr 29 mins</RunningTime>
</Movie>
<Movie>
<Rating>PG</Rating>
<Name>Shorts</Name>
<RunningTime>1 hr 29 mins</RunningTime>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>Taking Woodstock</Name>
<RunningTime>2 hrs 00 mins</RunningTime>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>The Final Destination</Name>
<RunningTime>1 hr 22 mins</RunningTime>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>The Final Destination 3D</Name>
<RunningTime>1 hr 22 mins</RunningTime>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>The Hangover</Name>
<RunningTime>1 hr 39 mins</RunningTime>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>The Hurt Locker</Name>
<RunningTime>2 hrs 07 mins</RunningTime>
</Movie>
<Movie>
<Rating>PG-13</Rating>
<Name>The Time Traveler’s Wife</Name>
<RunningTime>1 hr 47 mins</RunningTime>
</Movie>
</Movies>
</Theater>
<Theater>
<Name>Regal Starlight Cinema 14</Name>
<Address>11240 US Hwy 29, Charlotte, NC</Address>
<Movies>
<Movie>
<Rating>R</Rating>
<Name>District 9</Name>
<RunningTime>1 hr 51 mins</RunningTime>
<ShowTimes>2:25pm | 4:55pm | 7:35pm | 10:05pm</ShowTimes>
</Movie>
<Movie>
<Rating>PG</Rating>
<Name>G-Force</Name>
<RunningTime>1 hr 28 mins</RunningTime>
<ShowTimes>2:25pm | 4:40pm | 7:10pm | 9:35pm</ShowTimes>
</Movie>
<Movie>
<Rating>PG-13</Rating>
<Name>G.I. Joe: The Rise of Cobra</Name>
<RunningTime>1 hr 58 mins</RunningTime>
<ShowTimes>2:20pm | 5:00pm | 7:45pm | 10:25pm</ShowTimes>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>Halloween II</Name>
<RunningTime>1 hr 45 mins</RunningTime>
<ShowTimes>2:35pm | 5:10pm | 7:40pm | 10:15pm</ShowTimes>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>Inglourious Basterds</Name>
<RunningTime>2 hrs 32 mins</RunningTime>
<ShowTimes>2:55pm | 4:00pm | 7:05pm | 8:00pm | 10:20pm</ShowTimes>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>Orphan</Name>
<RunningTime>2 hrs 03 mins</RunningTime>
<ShowTimes>2:50pm | 7:25pm | 10:10pm</ShowTimes>
</Movie>
<Movie>
<Rating>PG-13</Rating>
<Name>Post Grad</Name>
<RunningTime>1 hr 29 mins</RunningTime>
<ShowTimes>2:30pm | 4:45pm | 7:20pm | 9:50pm</ShowTimes>
</Movie>
<Movie>
<Rating>PG</Rating>
<Name>Shorts</Name>
<RunningTime>1 hr 29 mins</RunningTime>
<ShowTimes>2:40pm | 4:50pm | 7:15pm | 9:30pm</ShowTimes>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>The Final Destination</Name>
<RunningTime>1 hr 22 mins</RunningTime>
<ShowTimes>2:45pm | 5:20pm | 7:30pm | 9:55pm</ShowTimes>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>The Goods: Live Hard. Sell Hard.</Name>
<RunningTime>1 hr 29 mins</RunningTime>
<ShowTimes>2:35pm | 5:20pm | 7:50pm | 10:00pm</ShowTimes>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>The Hangover</Name>
<RunningTime>1 hr 39 mins</RunningTime>
<ShowTimes>2:40pm | 5:10pm | 7:55pm | 10:25pm</ShowTimes>
</Movie>
<Movie>
<Rating>PG-13</Rating>
<Name>The Time Traveler’s Wife</Name>
<RunningTime>1 hr 47 mins</RunningTime>
<ShowTimes>2:30pm | 5:05pm | 7:45pm | 10:15pm</ShowTimes>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>The Ugly Truth</Name>
<RunningTime>1 hr 35 mins</RunningTime>
<ShowTimes>2:45pm | 5:15pm | 7:30pm | 9:55pm</ShowTimes>
</Movie>
</Movies>
</Theater>
<Theater>
<Name>Regal Phillips Place Stadium 10</Name>
<Address>6911 Phillips Place Ct., Charlotte, NC</Address>
<Movies>
<Movie>
<Rating>R</Rating>
<Name>District 9</Name>
<RunningTime>1 hr 51 mins</RunningTime>
<ShowTimes>12:10pm | 2:50pm | 5:25pm | 8:00pm | 10:35pm</ShowTimes>
</Movie>
<Movie>
<Rating>PG-13</Rating>
<Name>G.I. Joe: The Rise of Cobra</Name>
<RunningTime>1 hr 58 mins</RunningTime>
<ShowTimes>11:45am | 2:25pm | 5:05pm | 7:50pm | 10:30pm</ShowTimes>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>Halloween II</Name>
<RunningTime>1 hr 45 mins</RunningTime>
<ShowTimes>12:00pm | 2:30pm | 5:00pm | 7:30pm | 10:00pm</ShowTimes>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>Inglourious Basterds</Name>
<RunningTime>2 hrs 32 mins</RunningTime>
<ShowTimes>12:15pm | 3:30pm | 6:45pm | 10:10pm</ShowTimes>
</Movie>
<Movie>
<Rating>PG-13</Rating>
<Name>Julie &amp; Julia</Name>
<RunningTime>2 hrs 04 mins</RunningTime>
<ShowTimes>1:15pm | 4:00pm | 7:00pm | 10:20pm</ShowTimes>
</Movie>
<Movie>
<Rating>PG-13</Rating>
<Name>Post Grad</Name>
<RunningTime>1 hr 29 mins</RunningTime>
<ShowTimes>4:55pm | 9:40pm</ShowTimes>
</Movie>
<Movie>
<Rating>PG</Rating>
<Name>Shorts</Name>
<RunningTime>1 hr 29 mins</RunningTime>
<ShowTimes>12:05pm | 2:20pm | 4:30pm | 6:50pm | 9:30pm</ShowTimes>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>The Final Destination</Name>
<RunningTime>1 hr 22 mins</RunningTime>
<ShowTimes>12:20pm | 2:45pm | 5:15pm | 8:05pm | 10:15pm</ShowTimes>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>The Hangover</Name>
<RunningTime>1 hr 39 mins</RunningTime>
<ShowTimes>2:15pm | 7:25pm</ShowTimes>
</Movie>
<Movie>
<Rating>PG-13</Rating>
<Name>The Time Traveler’s Wife</Name>
<RunningTime>1 hr 47 mins</RunningTime>
<ShowTimes>11:55am | 2:35pm | 5:10pm | 7:45pm | 10:25pm</ShowTimes>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>The Ugly Truth</Name>
<RunningTime>1 hr 35 mins</RunningTime>
<ShowTimes>11:50am | 2:10pm | 4:40pm | 7:20pm | 9:45pm</ShowTimes>
</Movie>
</Movies>
</Theater>
<Theater>
<Name>AMC Concord Mills 24</Name>
<Address>8241 Concord Mills Blvd, Concord, NC</Address>
<Movies>
<Movie>
<Rating>PG-13</Rating>
<Name>(500) Days of Summer</Name>
<RunningTime>1 hr 35 mins</RunningTime>
<ShowTimes>11:55am | 2:30pm | 4:50pm | 7:10pm | 9:30pm</ShowTimes>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>A Perfect Getaway</Name>
<RunningTime>1 hr 37 mins</RunningTime>
<ShowTimes>10:05pm</ShowTimes>
</Movie>
<Movie>
<Rating>PG</Rating>
<Name>Aliens in the Attic</Name>
<RunningTime>1 hr 26 mins</RunningTime>
<ShowTimes>12:20pm | 2:40pm | 4:45pm</ShowTimes>
</Movie>
<Movie>
<Rating>PG</Rating>
<Name>Bandslam</Name>
<RunningTime>1 hr 51 mins</RunningTime>
<ShowTimes>8:50pm</ShowTimes>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>District 9</Name>
<RunningTime>1 hr 51 mins</RunningTime>
<ShowTimes>1:05pm | 4:05pm | 7:05pm | 9:50pm</ShowTimes>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>Funny People</Name>
<RunningTime>2 hrs 26 mins</RunningTime>
<ShowTimes>7:35pm | 10:45pm</ShowTimes>
</Movie>
<Movie>
<Rating>PG</Rating>
<Name>G-Force</Name>
<RunningTime>1 hr 28 mins</RunningTime>
<ShowTimes>11:50am | 2:05pm | 4:15pm | 6:35pm</ShowTimes>
</Movie>
<Movie>
<Rating>PG-13</Rating>
<Name>G.I. Joe: The Rise of Cobra</Name>
<RunningTime>1 hr 58 mins</RunningTime>
<ShowTimes>11:45am | 2:30pm | 5:15pm | 7:10pm | 8:05pm | 9:55pm | 10:45pm</ShowTimes>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>Halloween II</Name>
<RunningTime>1 hr 45 mins</RunningTime>
<ShowTimes>11:40am | 12:30pm | 2:10pm | 3:00pm | 4:40pm | 5:30pm | 7:15pm | 8:05pm | 9:50pm | 10:40pm</ShowTimes>
</Movie>
<Movie>
<Rating>PG</Rating>
<Name>Harry Potter and the Half-Blood Prince</Name>
<RunningTime>2 hrs 33 mins</RunningTime>
<ShowTimes>12:00pm | 3:20pm | 6:40pm | 10:00pm | 9:05pm</ShowTimes>
</Movie>
<Movie>
<Rating>PG</Rating>
<Name>Ice Age: Dawn of the Dinosaurs</Name>
<RunningTime>1 hr 34 mins</RunningTime>
<ShowTimes>12:45pm | 3:05pm | 5:20pm</ShowTimes>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>Inglourious Basterds</Name>
<RunningTime>2 hrs 32 mins</RunningTime>
<ShowTimes>12:50pm | 2:00pm | 4:10pm | 5:25pm | 7:30pm | 8:40pm | 10:45pm</ShowTimes>
</Movie>
<Movie>
<Rating>PG-13</Rating>
<Name>Julie &amp; Julia</Name>
<RunningTime>2 hrs 04 mins</RunningTime>
<ShowTimes>11:25am | 2:15pm | 5:00pm | 7:50pm | 10:35pm</ShowTimes>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>Orphan</Name>
<RunningTime>2 hrs 03 mins</RunningTime>
<ShowTimes>12:45pm | 3:35pm | 6:25pm | 9:25pm</ShowTimes>
</Movie>
<Movie>
<Rating>PG-13</Rating>
<Name>Play the Game</Name>
<RunningTime>1 hr 45 mins</RunningTime>
<ShowTimes>12:15pm | 2:45pm | 5:15pm | 7:45pm | 10:15pm</ShowTimes>
</Movie>
<Movie>
<Rating>PG-13</Rating>
<Name>Post Grad</Name>
<RunningTime>1 hr 29 mins</RunningTime>
<ShowTimes>12:10pm | 2:35pm | 4:55pm | 7:15pm | 9:35pm</ShowTimes>
</Movie>
<Movie>
<Rating>PG</Rating>
<Name>Shorts</Name>
<RunningTime>1 hr 29 mins</RunningTime>
<ShowTimes>12:05pm | 2:20pm | 4:35pm | 6:50pm</ShowTimes>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>Taking Woodstock</Name>
<RunningTime>2 hrs 00 mins</RunningTime>
<ShowTimes>11:35am | 2:25pm | 5:10pm | 8:00pm | 10:45pm</ShowTimes>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>The Final Destination</Name>
<RunningTime>1 hr 22 mins</RunningTime>
<ShowTimes>11:30am | 1:35pm | 3:40pm | 5:45pm | 7:55pm | 10:10pm | 12:25pm | 2:50pm | 5:05pm | 7:10pm | 9:20pm</ShowTimes>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>The Goods: Live Hard. Sell Hard.</Name>
<RunningTime>1 hr 29 mins</RunningTime>
<ShowTimes>1:55pm | 5:35pm | 7:50pm</ShowTimes>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>The Hangover</Name>
<RunningTime>1 hr 39 mins</RunningTime>
<ShowTimes>1:00pm | 3:25pm | 5:50pm | 8:15pm | 10:35pm</ShowTimes>
</Movie>
<Movie>
<Rating>PG-13</Rating>
<Name>The Proposal</Name>
<RunningTime>1 hr 48 mins</RunningTime>
<ShowTimes>7:20pm | 10:05pm</ShowTimes>
</Movie>
<Movie>
<Rating>PG-13</Rating>
<Name>The Time Traveler’s Wife</Name>
<RunningTime>1 hr 47 mins</RunningTime>
<ShowTimes>1:15pm | 4:10pm | 6:55pm | 9:30pm | 1:15pm | 4:10pm | 6:55pm | 9:30pm</ShowTimes>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>The Ugly Truth</Name>
<RunningTime>1 hr 35 mins</RunningTime>
<ShowTimes>12:55pm | 3:25pm | 5:50pm | 8:10pm | 10:30pm</ShowTimes>
</Movie>
<Movie>
<Rating>PG-13</Rating>
<Name>Transformers: Revenge of the Fallen</Name>
<RunningTime>2 hrs 29 mins</RunningTime>
<ShowTimes>12:40pm | 3:55pm</ShowTimes>
</Movie>
</Movies>
</Theater>
<Theater>
<Name>Ayrsley Grand 14</Name>
<Address>9110 Kings Parade Blvd., Charlotte, NC</Address>
<Movies>
<Movie>
<Rating>R</Rating>
<Name>District 9</Name>
<RunningTime>1 hr 51 mins</RunningTime>
<ShowTimes>1:20pm | 3:50pm | 7:25pm | 9:45pm</ShowTimes>
</Movie>
<Movie>
<Rating>PG</Rating>
<Name>G-Force</Name>
<RunningTime>1 hr 28 mins</RunningTime>
<ShowTimes>1:10pm | 3:00pm | 5:00pm | 7:15pm | 9:15pm</ShowTimes>
</Movie>
<Movie>
<Rating>PG-13</Rating>
<Name>G.I. Joe: The Rise of Cobra</Name>
<RunningTime>1 hr 58 mins</RunningTime>
<ShowTimes>1:00pm | 3:40pm | 7:00pm | 9:30pm</ShowTimes>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>Halloween II</Name>
<RunningTime>1 hr 45 mins</RunningTime>
<ShowTimes>1:45pm | 4:15pm | 7:40pm | 9:50pm</ShowTimes>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>Inglourious Basterds</Name>
<RunningTime>2 hrs 32 mins</RunningTime>
<ShowTimes>1:45pm | 5:00pm | 8:15pm</ShowTimes>
</Movie>
<Movie>
<Rating>PG-13</Rating>
<Name>Julie &amp; Julia</Name>
<RunningTime>2 hrs 04 mins</RunningTime>
<ShowTimes>1:30pm | 4:30pm | 7:10pm | 9:40pm</ShowTimes>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>Orphan</Name>
<RunningTime>2 hrs 03 mins</RunningTime>
<ShowTimes>1:30pm | 4:20pm | 7:15pm | 9:40pm</ShowTimes>
</Movie>
<Movie>
<Rating>PG-13</Rating>
<Name>Post Grad</Name>
<RunningTime>1 hr 29 mins</RunningTime>
<ShowTimes>1:20pm | 3:20pm | 5:20pm | 7:25pm | 9:25pm</ShowTimes>
</Movie>
<Movie>
<Rating>PG</Rating>
<Name>Shorts</Name>
<RunningTime>1 hr 29 mins</RunningTime>
<ShowTimes>1:00pm | 3:00pm | 5:00pm | 7:15pm | 9:15pm</ShowTimes>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>Taking Woodstock</Name>
<RunningTime>2 hrs 00 mins</RunningTime>
<ShowTimes>1:40pm | 4:00pm | 7:20pm | 9:50pm</ShowTimes>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>The Final Destination 3D</Name>
<RunningTime>1 hr 22 mins</RunningTime>
<ShowTimes>1:15pm | 3:10pm | 5:00pm | 7:10pm | 9:00pm</ShowTimes>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>The Hangover</Name>
<RunningTime>1 hr 39 mins</RunningTime>
<ShowTimes>1:45pm | 4:00pm | 7:30pm | 9:45pm</ShowTimes>
</Movie>
<Movie>
<Rating>PG-13</Rating>
<Name>The Time Traveler’s Wife</Name>
<RunningTime>1 hr 47 mins</RunningTime>
<ShowTimes>1:30pm | 4:20pm | 7:00pm | 9:20pm</ShowTimes>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>The Ugly Truth</Name>
<RunningTime>1 hr 35 mins</RunningTime>
<ShowTimes>1:50pm | 4:10pm | 7:30pm | 9:40pm</ShowTimes>
</Movie>
</Movies>
</Theater>
<Theater>
<Name>AMC Carolina Pavilion 22</Name>
<Address>9541 South Boulevard, Charlotte, NC</Address>
<Movies>
<Movie>
<Rating>PG-13</Rating>
<Name>(500) Days of Summer</Name>
<RunningTime>1 hr 35 mins</RunningTime>
<ShowTimes>4:05pm | 9:30pm</ShowTimes>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>A Perfect Getaway</Name>
<RunningTime>1 hr 37 mins</RunningTime>
<ShowTimes>7:15pm | 10:15pm</ShowTimes>
</Movie>
<Movie>
<Rating>PG</Rating>
<Name>Aliens in the Attic</Name>
<RunningTime>1 hr 26 mins</RunningTime>
<ShowTimes>1:10pm | 3:35pm</ShowTimes>
</Movie>
<Movie>
<Rating>PG</Rating>
<Name>Bandslam</Name>
<RunningTime>1 hr 51 mins</RunningTime>
<ShowTimes>1:00pm | 4:35pm</ShowTimes>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>District 9</Name>
<RunningTime>1 hr 51 mins</RunningTime>
<ShowTimes>1:45pm | 4:30pm | 7:10pm | 9:50pm</ShowTimes>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>Funny People</Name>
<RunningTime>2 hrs 26 mins</RunningTime>
<ShowTimes>6:25pm | 9:40pm</ShowTimes>
</Movie>
<Movie>
<Rating>PG</Rating>
<Name>G-Force</Name>
<RunningTime>1 hr 28 mins</RunningTime>
<ShowTimes>12:50pm | 3:50pm</ShowTimes>
</Movie>
<Movie>
<Rating>PG-13</Rating>
<Name>G.I. Joe: The Rise of Cobra</Name>
<RunningTime>1 hr 58 mins</RunningTime>
<ShowTimes>12:45pm | 1:25pm | 3:30pm | 4:15pm | 6:30pm | 9:30pm</ShowTimes>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>Halloween II</Name>
<RunningTime>1 hr 45 mins</RunningTime>
<ShowTimes>12:35pm | 3:55pm | 7:35pm | 10:00pm</ShowTimes>
</Movie>
<Movie>
<Rating>PG</Rating>
<Name>Harry Potter and the Half-Blood Prince</Name>
<RunningTime>2 hrs 33 mins</RunningTime>
<ShowTimes>12:40pm | 4:25pm | 8:00pm</ShowTimes>
</Movie>
<Movie>
<Rating>PG</Rating>
<Name>Ice Age: Dawn of the Dinosaurs</Name>
<RunningTime>1 hr 34 mins</RunningTime>
<ShowTimes>12:00pm | 2:10pm | 4:45pm</ShowTimes>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>Inglourious Basterds</Name>
<RunningTime>2 hrs 32 mins</RunningTime>
<ShowTimes>12:00pm | 1:30pm | 3:20pm | 5:30pm | 7:00pm | 8:45pm | 10:25pm</ShowTimes>
</Movie>
<Movie>
<Rating>PG-13</Rating>
<Name>Julie &amp; Julia</Name>
<RunningTime>2 hrs 04 mins</RunningTime>
<ShowTimes>12:55pm | 4:10pm | 7:25pm | 10:10pm</ShowTimes>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>Orphan</Name>
<RunningTime>2 hrs 03 mins</RunningTime>
<ShowTimes>1:05pm | 4:40pm | 7:45pm | 10:30pm</ShowTimes>
</Movie>
<Movie>
<Rating>PG-13</Rating>
<Name>Post Grad</Name>
<RunningTime>1 hr 29 mins</RunningTime>
<ShowTimes>12:30pm | 6:50pm</ShowTimes>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>Public Enemies</Name>
<RunningTime>2 hrs 20 mins</RunningTime>
<ShowTimes>7:00pm | 10:05pm</ShowTimes>
</Movie>
<Movie>
<Rating>PG</Rating>
<Name>Shorts</Name>
<RunningTime>1 hr 29 mins</RunningTime>
<ShowTimes>1:15pm | 3:40pm | 5:50pm | 8:05pm | 10:20pm</ShowTimes>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>Spread</Name>
<RunningTime>1 hr 37 mins</RunningTime>
<ShowTimes>1:30pm | 4:20pm | 7:10pm | 10:00pm</ShowTimes>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>Taking Woodstock</Name>
<RunningTime>2 hrs 00 mins</RunningTime>
<ShowTimes>12:15pm | 3:25pm | 7:25pm | 10:10pm</ShowTimes>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>The Collector</Name>
<RunningTime>1 hr 28 mins</RunningTime>
<ShowTimes>7:20pm | 9:45pm</ShowTimes>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>The Final Destination</Name>
<RunningTime>1 hr 22 mins</RunningTime>
<ShowTimes>12:20pm | 1:20pm | 2:30pm | 3:30pm | 4:50pm | 5:40pm | 7:05pm | 8:10pm | 9:15pm | 10:30pm</ShowTimes>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>The Goods: Live Hard. Sell Hard.</Name>
<RunningTime>1 hr 29 mins</RunningTime>
<ShowTimes>6:35pm | 9:05pm</ShowTimes>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>The Hangover</Name>
<RunningTime>1 hr 39 mins</RunningTime>
<ShowTimes>6:45pm | 9:10pm</ShowTimes>
</Movie>
<Movie>
<Rating>PG-13</Rating>
<Name>The Time Traveler’s Wife</Name>
<RunningTime>1 hr 47 mins</RunningTime>
<ShowTimes>12:25pm | 4:00pm | 6:40pm | 9:35pm</ShowTimes>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>The Ugly Truth</Name>
<RunningTime>1 hr 35 mins</RunningTime>
<ShowTimes>6:55pm | 9:25pm</ShowTimes>
</Movie>
<Movie>
<Rating>PG-13</Rating>
<Name>Transformers: Revenge of the Fallen</Name>
<RunningTime>2 hrs 29 mins</RunningTime>
<ShowTimes>12:05pm | 3:15pm</ShowTimes>
</Movie>
<Movie>
<Rating>PG</Rating>
<Name>Up</Name>
<RunningTime>1 hr 29 mins</RunningTime>
<ShowTimes>12:10pm | 2:35pm | 5:00pm</ShowTimes>
</Movie>
</Movies>
</Theater>
<Theater>
<Name>Charlotte Crownpoint</Name>
<Address>9630 Monroe Road, Charlotte, NC</Address>
<Movies>
<Movie>
<Rating>R</Rating>
<Name>District 9</Name>
<RunningTime>1 hr 51 mins</RunningTime>
<ShowTimes>1:50pm | 4:35pm | 7:15pm | 9:50pm</ShowTimes>
</Movie>
<Movie>
<Rating>PG</Rating>
<Name>G-Force</Name>
<RunningTime>1 hr 28 mins</RunningTime>
<ShowTimes>2:55pm | 7:50pm</ShowTimes>
</Movie>
<Movie>
<Rating>PG-13</Rating>
<Name>G.I. Joe: The Rise of Cobra</Name>
<RunningTime>1 hr 58 mins</RunningTime>
<ShowTimes>11:45am | 2:25pm | 5:05pm | 7:45pm | 10:30pm</ShowTimes>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>Halloween II</Name>
<RunningTime>1 hr 45 mins</RunningTime>
<ShowTimes>12:40pm | 2:50pm | 5:10pm | 7:30pm | 9:50pm</ShowTimes>
</Movie>
<Movie>
<Rating>PG</Rating>
<Name>Harry Potter and the Half-Blood Prince</Name>
<RunningTime>2 hrs 33 mins</RunningTime>
<ShowTimes>12:30pm | 3:50pm | 7:05pm | 10:20pm</ShowTimes>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>Inglourious Basterds</Name>
<RunningTime>2 hrs 32 mins</RunningTime>
<ShowTimes>12:40pm | 3:55pm | 7:10pm | 10:25pm</ShowTimes>
</Movie>
<Movie>
<Rating>PG-13</Rating>
<Name>Julie &amp; Julia</Name>
<RunningTime>2 hrs 04 mins</RunningTime>
<ShowTimes>1:45pm | 4:40pm | 7:30pm | 10:15pm</ShowTimes>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>Orphan</Name>
<RunningTime>2 hrs 03 mins</RunningTime>
<ShowTimes>1:55pm | 4:30pm | 7:05pm | 9:45pm</ShowTimes>
</Movie>
<Movie>
<Rating>PG-13</Rating>
<Name>Post Grad</Name>
<RunningTime>1 hr 29 mins</RunningTime>
<ShowTimes>12:35pm | 5:15pm | 10:00pm</ShowTimes>
</Movie>
<Movie>
<Rating>PG</Rating>
<Name>Shorts</Name>
<RunningTime>1 hr 29 mins</RunningTime>
<ShowTimes>12:25pm | 2:45pm | 5:00pm | 7:20pm | 9:35pm</ShowTimes>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>The Final Destination 3D</Name>
<RunningTime>1 hr 22 mins</RunningTime>
<ShowTimes>1:05pm | 3:10pm | 5:20pm | 7:45pm | 9:55pm</ShowTimes>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>The Goods: Live Hard. Sell Hard.</Name>
<RunningTime>1 hr 29 mins</RunningTime>
<ShowTimes>1:00pm | 3:10pm | 5:25pm | 7:40pm | 9:55pm</ShowTimes>
</Movie>
<Movie>
<Rating>PG-13</Rating>
<Name>The Time Traveler’s Wife</Name>
<RunningTime>1 hr 47 mins</RunningTime>
<ShowTimes>11:50am | 2:20pm | 4:55pm | 7:25pm | 10:00pm</ShowTimes>
</Movie>
</Movies>
</Theater>
<Theater>
<Name>Cinemark Movies 10</Name>
<Address>9508 Northeast Ct, Matthews, NC</Address>
<Movies>
<Movie>
<Rating>PG-13</Rating>
<Name>Drag Me to Hell</Name>
<RunningTime>1 hr 39 mins</RunningTime>
<ShowTimes>3:55pm | 7:20pm | 9:45pm</ShowTimes>
</Movie>
<Movie>
<Rating>PG</Rating>
<Name>Imagine That</Name>
<RunningTime>1 hr 47 mins</RunningTime>
<ShowTimes>4:00pm | 7:15pm | 9:55pm</ShowTimes>
</Movie>
<Movie>
<Rating>PG-13</Rating>
<Name>My Sister’s Keeper</Name>
<RunningTime>1 hr 48 mins</RunningTime>
<ShowTimes>4:20pm | 7:25pm | 10:00pm</ShowTimes>
</Movie>
<Movie>
<Rating>PG</Rating>
<Name>Night at the Museum: Battle of the Smithsonian</Name>
<RunningTime>1 hr 45 mins</RunningTime>
<ShowTimes>3:25pm | 4:30pm | 5:55pm | 7:00pm | 8:15pm | 9:25pm</ShowTimes>
</Movie>
<Movie>
<Rating>PG-13</Rating>
<Name>Star Trek</Name>
<RunningTime>2 hrs 06 mins</RunningTime>
<ShowTimes>3:50pm | 6:45pm | 9:30pm</ShowTimes>
</Movie>
<Movie>
<Rating>PG-13</Rating>
<Name>Terminator Salvation</Name>
<RunningTime>1 hr 56 mins</RunningTime>
<ShowTimes>4:10pm | 7:05pm | 9:50pm</ShowTimes>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>The Taking of Pelham 123</Name>
<RunningTime>1 hr 46 mins</RunningTime>
<ShowTimes>4:15pm | 7:10pm | 9:35pm</ShowTimes>
</Movie>
<Movie>
<Rating>PG</Rating>
<Name>Up</Name>
<RunningTime>1 hr 29 mins</RunningTime>
<ShowTimes>3:30pm | 4:35pm | 5:50pm | 6:55pm | 8:10pm | 9:15pm</ShowTimes>
</Movie>
</Movies>
</Theater>
<Theater>
<Name>Regal Arboretum Stadium 12</Name>
<Address>8008 Providence Road, Charlotte, NC</Address>
<Movies>
<Movie>
<Rating>R</Rating>
<Name>District 9</Name>
<RunningTime>1 hr 51 mins</RunningTime>
<ShowTimes>1:20pm | 4:25pm | 7:25pm | 10:10pm</ShowTimes>
</Movie>
<Movie>
<Rating>PG</Rating>
<Name>G-Force</Name>
<RunningTime>1 hr 28 mins</RunningTime>
<ShowTimes>1:30pm | 4:15pm | 7:15pm | 9:40pm</ShowTimes>
</Movie>
<Movie>
<Rating>PG-13</Rating>
<Name>G.I. Joe: The Rise of Cobra</Name>
<RunningTime>1 hr 58 mins</RunningTime>
<ShowTimes>1:25pm | 4:35pm | 7:05pm | 9:50pm</ShowTimes>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>Halloween II</Name>
<RunningTime>1 hr 45 mins</RunningTime>
<ShowTimes>1:45pm | 4:40pm | 7:40pm | 10:20pm</ShowTimes>
</Movie>
<Movie>
<Rating>PG</Rating>
<Name>Harry Potter and the Half-Blood Prince</Name>
<RunningTime>2 hrs 33 mins</RunningTime>
<ShowTimes>9:35pm</ShowTimes>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>Inglourious Basterds</Name>
<RunningTime>2 hrs 32 mins</RunningTime>
<ShowTimes>2:00pm | 7:00pm | 10:15pm</ShowTimes>
</Movie>
<Movie>
<Rating>PG-13</Rating>
<Name>Julie &amp; Julia</Name>
<RunningTime>2 hrs 04 mins</RunningTime>
<ShowTimes>1:05pm | 4:00pm | 7:20pm | 10:05pm</ShowTimes>
</Movie>
<Movie>
<Rating>PG-13</Rating>
<Name>Post Grad</Name>
<RunningTime>1 hr 29 mins</RunningTime>
<ShowTimes>1:00pm | 4:20pm | 7:35pm | 9:45pm</ShowTimes>
</Movie>
<Movie>
<Rating>PG</Rating>
<Name>Shorts</Name>
<RunningTime>1 hr 29 mins</RunningTime>
<ShowTimes>1:35pm | 4:10pm | 7:10pm</ShowTimes>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>The Final Destination</Name>
<RunningTime>1 hr 22 mins</RunningTime>
<ShowTimes>1:40pm | 4:50pm | 7:50pm | 9:55pm</ShowTimes>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>The Hangover</Name>
<RunningTime>1 hr 39 mins</RunningTime>
<ShowTimes>1:50pm | 4:45pm | 7:45pm | 10:25pm</ShowTimes>
</Movie>
<Movie>
<Rating>PG-13</Rating>
<Name>The Time Traveler’s Wife</Name>
<RunningTime>1 hr 47 mins</RunningTime>
<ShowTimes>1:15pm | 4:30pm | 7:30pm | 10:00pm</ShowTimes>
</Movie>
<Movie>
<Rating>PG</Rating>
<Name>Up</Name>
<RunningTime>1 hr 29 mins</RunningTime>
<ShowTimes>1:10pm | 4:05pm | 6:55pm | 9:30pm</ShowTimes>
</Movie>
</Movies>
</Theater>
<Theater>
<Name>Regal Movies @ Franklin Square</Name>
<Address>3778 E. Franklin Boulevard, Gastonia, NC</Address>
<Movies>
<Movie>
<Rating>R</Rating>
<Name>District 9</Name>
<RunningTime>1 hr 51 mins</RunningTime>
<ShowTimes>11:55am | 2:50pm | 5:30pm | 8:05pm | 10:40pm</ShowTimes>
</Movie>
<Movie>
<Rating>PG</Rating>
<Name>G-Force</Name>
<RunningTime>1 hr 28 mins</RunningTime>
<ShowTimes>12:15pm | 2:25pm | 4:35pm | 7:15pm | 9:35pm</ShowTimes>
</Movie>
<Movie>
<Rating>PG-13</Rating>
<Name>G.I. Joe: The Rise of Cobra</Name>
<RunningTime>1 hr 58 mins</RunningTime>
<ShowTimes>11:50am | 2:30pm | 5:10pm | 7:45pm | 10:30pm</ShowTimes>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>Halloween II</Name>
<RunningTime>1 hr 45 mins</RunningTime>
<ShowTimes>12:10pm | 2:35pm | 5:00pm | 7:25pm | 9:50pm</ShowTimes>
</Movie>
<Movie>
<Rating>PG</Rating>
<Name>Harry Potter and the Half-Blood Prince</Name>
<RunningTime>2 hrs 33 mins</RunningTime>
<ShowTimes>12:30pm | 3:50pm | 7:00pm | 10:15pm</ShowTimes>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>Inglourious Basterds</Name>
<RunningTime>2 hrs 32 mins</RunningTime>
<ShowTimes>11:45am | 1:00pm | 3:00pm | 4:30pm | 6:30pm | 8:00pm | 9:45pm</ShowTimes>
</Movie>
<Movie>
<Rating>PG-13</Rating>
<Name>Julie &amp; Julia</Name>
<RunningTime>2 hrs 04 mins</RunningTime>
<ShowTimes>1:10pm | 4:10pm | 7:05pm | 10:00pm</ShowTimes>
</Movie>
<Movie>
<Rating>PG-13</Rating>
<Name>Post Grad</Name>
<RunningTime>1 hr 29 mins</RunningTime>
<ShowTimes>5:25pm | 10:10pm</ShowTimes>
</Movie>
<Movie>
<Rating>PG</Rating>
<Name>Shorts</Name>
<RunningTime>1 hr 29 mins</RunningTime>
<ShowTimes>12:25pm | 3:05pm | 5:20pm | 7:55pm | 10:20pm</ShowTimes>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>The Final Destination</Name>
<RunningTime>1 hr 22 mins</RunningTime>
<ShowTimes>12:00pm | 12:40pm | 2:05pm | 2:45pm | 4:15pm | 4:50pm | 7:10pm | 7:50pm | 9:15pm | 9:55pm</ShowTimes>
</Movie>
<Movie>
<Rating>R</Rating>
<Name>The Hurt Locker</Name>
<RunningTime>2 hrs 07 mins</RunningTime>
<ShowTimes>12:55pm | 3:55pm | 6:50pm | 9:40pm</ShowTimes>
</Movie>
<Movie>
<Rating>PG-13</Rating>
<Name>The Proposal</Name>
<RunningTime>1 hr 48 mins</RunningTime>
<ShowTimes>12:20pm | 2:55pm | 7:40pm</ShowTimes>
</Movie>
<Movie>
<Rating>PG-13</Rating>
<Name>The Time Traveler’s Wife</Name>
<RunningTime>1 hr 47 mins</RunningTime>
<ShowTimes>2:40pm | 5:05pm | 10:35pm | 12:05pm | 8:05pm</ShowTimes>
</Movie>
<Movie>
<Name>Jobs</Name>
</Movie>
</Movies>
</Theater>
</GetTheatersAndMoviesResult>
</GetTheatersAndMoviesResponse>
</soap:Body>
</soap:Envelope>

As you can see, it’s very straight forward. If you have any questions, feel free to shoot me an email.