November 4, 2004

Reading Configuration Information from an XML File

This tip helps to read configuration information in an XML file. Using XPath, the values can be read simply and the value is fetched from the file as CString. /*********** The header file ******************************/class CXMLConfig {private: IXMLDOMDocument* m_pXMLDocument; CString m_strFileName;public: CXMLConfig(void); ~CXMLConfig(void); CXMLConfig(CString strConfigFileName); HRESULT LoadXMLDocument(); CString GetValue(CString strXPath); void

Authenticate the UDDI Server and Gain Access to the UDDI Registry

The following code uses the the UDDI4J library to authenticate to UDDI and gain access to the UDDI registry: import org.uddi4j.client.UDDIProxy;import org.uddi4j.response.AuthToken;private AuthToken accessUDDI(){ UDDIProxy uddiProxy = new UDDIProxy(); //Create an instance of UDDIProxy AuthToken token = new AuthToken(); //Create an instance of AuthToken try{ uddiProxy.setInquiryURL(UDDI_INQUIRY_URL); //Set the inquiry URL

Read an Image from a Database and Show it in a Browser

This script reads the image from the databse and uses JDBC and stream to write it into a browser. //import the required filesimport …//class declarationpublic class … extends HttpServlet{ public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { Connection conn = null; byte[] buffer = new byte[4 * 1024];

Learn to Write XAML Applications Today with Xamlon

AML is an XML-based markup language that describes UI content and behavior. The concept is similar to the combination of HTML and JavaScript used in Web applications today, but far more ambitious. “Avalon” is the codename for the runtime that interprets XAML documents and turns them into interactive applications. You

Build Better Mobile UIs with a New Brew Framework, Part II

n my last article, I showed you how to get started with the QUALCOMM BREW UI toolkit and introduced BREW’s notion of forms and widgets. In this article, you’ll build on that knowledge and look at an entire multi-screen application to see how forms, widgets, models, and listeners fit together.