private boolean canAutoCreate( DataForm publishOptions )
    {
        // Since pep#auto-create is advertised in disco#info in hard-code, this is always allowed, unless the publish options explicitly forbid this.
        if ( publishOptions == null )
        {
            return true;
        }

        final FormField field = publishOptions.getField( "pubsub#auto-create" );
        if ( field == null )
        {
            return true;
        }

        final String firstValue = field.getFirstValue();
        return "1".equals( firstValue ) || "true".equalsIgnoreCase( firstValue );

    }
Checks if a node is allowed to be auto-created, given the configuration of the service and the optional publish options.

@param publishOptions publish options (can be null)
@return true if auto-creation of nodes on publish to a non-existent node is allowed, otherwise false.
xmppserver/src/main/java/org/jivesoftware/openfire/pubsub/PubSubEngine.java