September 20, 2006

Create a SAXSource with InputSource and XMLReader

One way to create a SAXSource is to use a SAX InputSource and an XMLReader object. The transformer, ContentHandler, calls the XMLReader.parse(InputSource IS) method. Here’s an example: … try{ //get a SAXParserFactory instance SAXParserFactory SAXpf=SAXParserFactory.newInstance(); //enabling the namespaces processing if(SAXpf.isNamespaceAware()==false) SAXpf.setNamespaceAware(true); //get a SAXParser object SAXParser SAXparser=SAXpf.newSAXParser(); //get the XMLReader

Object Functions in Use

An object function is a regular C++ object whose class defines the () operator. An object with a () operator can be called like a function: CFoo foo; // just an object whose class has operator() definedfoo(); // like a function; makes operator() work You can use an object function

Using Multiline Strings in .NET Resource Files

Displaying strings from .NET resource files may be a puzzle if the strings include escape sequences. For example, take the newline (linefeed) character. Suppose you want to display a hardcoded text in a MessageBox. You might write your C# code as follows: string myString = “Show me on the first

Top 10 Security Vulnerabilities in .NET Configuration Files

hese days, the biggest threat to an organization’s network security comes from its public Web site. Unlike internal-only network services such as databases?which can be sealed off from the outside via firewalls?a public Web site is generally accessible to anyone who wants to view it. As networks have become more

Count the Number of Cells Containing a Specified String in a Worksheet

This small function counts the number of cells in a worksheet that contain a specified string and outputs a total. Suppose you set the string to = “”. The function counts the number of cells in the sheet that contain anything?you simply insert it into a module: Option ExplicitDim max_column_number