This mod was originally created by Mark Murray and updated by Johnny Elliott. I have made it independent of the PetFrame, and tweaked it to work since Patch 2.4, and have now updated it to work with Cataclysm.
From the Readme.txt:
When first installed, the frame will be in the center of the screen (see Picture #1), and can then be moved anywhere on the screen by left-click and dragging on the border. I usually place it under my pet's focus bar, leaving room for the buffs/debuffs to show.
/pxb raw - Toggles between showing raw XP and XP percentage on the XP Bar.
/pxb tooltip - Toggles between highly detailed and simple tooltip viewing modes.
/pxb fade - Toggles XP Bar text in and out of fade mode. When on, text only shows on mouseover.
/pxb level - Toggles the level icon on or off.
/pxb bar - Toggles the XP Bar on or off.
/pxb rollover - Toggles the rollover tooltip on or off.
/pxb toolfade - Toggles whether or not to try and fade out tooltip.
/pxb tooltipcolor - Toggles showing the tooltip the same color as the XP Bar.
/pxb icon - Toggles Pet Family icon next to the XP Bar on or off.
/pxb debug - Prints debug information about all your settings in the chat frame.
/pxb update - Forces PXB to update all data.
/pxb style <value> - Set the style of the XP Bar border. Use values 0-3. 0 is default.
/pxb font <value> - Sets the font style. Use values 0-5. 0 is default.
/pxb texture <value> - Sets the XP Bar texture. Use values 0-3. 0 is default.
/pxb medium - Sets the bar in medium mode (Default)
/pxb large - Sets the bar in a larger mode.
/pxb red <value> - Sets the Red RGB Channel to <value>. 0-100, higher is darker.
/pxb green <value> - Sets the Green RGB Channel to <value>. 0-100, higher is darker.
/pxb blue <value> - Sets the Blue RGB Channel to <value>. 0-100, higher is darker.
/pxb alpha <value> - Sets the Alpha Channel to <value>. 0-100, higher is less transparent.
/pxb resetcolor - Resets the addon to the original color values.
/pxb dock - Toggles docking the bar to the PetFrame, or the UIParent.
/pxb lock - Toggles the ability to move the XP Bar.
/pxb reset - Resets the XP Bar position to the default.
All settings are on a per-character basis now, you might have to delete the following file if you encounter problems:
World of Warcraft\WTF\Account\<AccountName>\<Server>\<CharacterName>\SavedVariables\PetXPBar.lua
-- Fixed the issue where the bar wouldn't initially show
-- Changed the stable tooltips to reflect the changes made by Blizzard
-- Changed the stats in the complex tooltip to account for Blizzard changes
-- toc bump
accounted for unused talent points
-- I believe this should fix the issue of the bar either not appearing, or being out of position.
-- Fixed issues with Stable Info not reporting properly
-- Fixed issue with Pet name showing as "Unknown"
-- Updated for WotLK
-- Made dockable to PetFrame