Code example for NamespaceContext

Methods: getNamespaceURI

0
               case 0: 
                   throw new IllegalArgumentException("Default prefix must be indicated by not using a colon: " + arg0);
                  default: 
                      String prefix = arg0.substring(0, offset);
                      localName = arg0.substring(offset+1);
                      uri = arg1.getNamespaceURI(prefix);
                      if (uri == null) {
                          throw new IllegalArgumentException("The prefix " + prefix + " is not bound.");
                      } 
        } 
        return new QName(uri, localName);
    } 
 
    public Calendar parseDateTime(String arg0) {
        XsDateTimeFormat format = new XsDateTimeFormat();
        ParsePosition pos = new ParsePosition(0);
        Calendar cal = (Calendar) format.parseObject(arg0, pos);
        if (cal == null) {
            throw new IllegalArgumentException("Failed to parse dateTime " + arg0 +
                    						   " at:" + arg0.substring(pos.getErrorIndex()));