Nov 19

You can specify a schema for validation when configuring the DocumentBuilderFactory that is used to parse the XML

static final String JAXP_SCHEMA_LANGUAGE =
static final String W3C_XML_SCHEMA =

DocumentBuilderFactory factory = 

DocumentBuilder builder = factory.newDocumentBuilder();
Document document = builder.parse(url.openStream()); 

written by objects \\ tags: , , , , ,

Oct 24

Recently added a Facebook Fan/Like box widget to one of our sites. We used the following code and it worked great in our development environment when we tested it on Firefox and Safari.

<fb:fan href=""
   width="210" height="600" connections="0"></fb:fan>

But as is all too often the case when we tested it on IE it failed. No errors just a big blank space.

After some investigation it turns out that IE needs the Facebook namespace defined in the html tag. Adding the namespace as shown below fixed the problem.

<html xmlns="" xmlns:fb="">

The end result can be found on the Obiweb blog.

written by objects \\ tags: , , , , ,