<?xml version="1.0"?>

<ownershipDocument>

    <schemaVersion>X0201</schemaVersion>

    <documentType>4</documentType>

    <periodOfReport>2003-08-18</periodOfReport>


    <notSubjectToSection16>0</notSubjectToSection16>

    <issuer>
        <issuerCik>0001048501</issuerCik>
        <issuerName>XML GLOBAL TECHNOLOGIES INC</issuerName>
        <issuerTradingSymbol>XMLG</issuerTradingSymbol>
    </issuer>

    <reportingOwner>
        <reportingOwnerId>
            <rptOwnerCik>0001240008</rptOwnerCik>
            <rptOwnerName>PARADIGM MILLENNIUM FUND LP</rptOwnerName>
        </reportingOwnerId>
        <reportingOwnerAddress>
            <rptOwnerStreet1>3000 DUNDEE ROAD</rptOwnerStreet1>
            <rptOwnerStreet2>SUITE 105</rptOwnerStreet2>
            <rptOwnerCity>NORTHBROOK</rptOwnerCity>
            <rptOwnerState>IL</rptOwnerState>
            <rptOwnerZipCode>60062</rptOwnerZipCode>
            <rptOwnerStateDescription></rptOwnerStateDescription>
        </reportingOwnerAddress>
        <reportingOwnerRelationship>
            <isDirector>0</isDirector>
            <isOfficer>0</isOfficer>
            <isTenPercentOwner>1</isTenPercentOwner>
            <isOther>0</isOther>
        </reportingOwnerRelationship>
    </reportingOwner>

    <nonDerivativeTable>

        <nonDerivativeTransaction>
            <securityTitle>
                <value>Common Stock</value>
            </securityTitle>
            <transactionDate>
                <value>2003-08-18</value>
            </transactionDate>
            <transactionCoding>
                <transactionFormType>4</transactionFormType>
                <transactionCode>P</transactionCode>
                <equitySwapInvolved>0</equitySwapInvolved>
            </transactionCoding>
            <transactionTimeliness>
                <value></value>
            </transactionTimeliness>
            <transactionAmounts>
                <transactionShares>
                    <value>114000</value>
                </transactionShares>
                <transactionPricePerShare>
                    <value>0.07</value>
                </transactionPricePerShare>
                <transactionAcquiredDisposedCode>
                    <value>A</value>
                </transactionAcquiredDisposedCode>
            </transactionAmounts>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>22284991</value>
                </sharesOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>D</value>
                </directOrIndirectOwnership>
            </ownershipNature>
        </nonDerivativeTransaction>

        <nonDerivativeTransaction>
            <securityTitle>
                <value>Common Stock</value>
            </securityTitle>
            <transactionDate>
                <value>2003-08-18</value>
            </transactionDate>
            <transactionCoding>
                <transactionFormType>4</transactionFormType>
                <transactionCode>P</transactionCode>
                <equitySwapInvolved>0</equitySwapInvolved>
            </transactionCoding>
            <transactionTimeliness>
                <value></value>
            </transactionTimeliness>
            <transactionAmounts>
                <transactionShares>
                    <value>35000</value>
                </transactionShares>
                <transactionPricePerShare>
                    <value>0.07</value>
                </transactionPricePerShare>
                <transactionAcquiredDisposedCode>
                    <value>A</value>
                </transactionAcquiredDisposedCode>
            </transactionAmounts>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>22319991</value>
                </sharesOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>D</value>
                </directOrIndirectOwnership>
            </ownershipNature>
        </nonDerivativeTransaction>

        <nonDerivativeHolding>
            <securityTitle>
                <value>Common Stock (issuable under Term Sheet)</value>
            </securityTitle>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>12500000</value>
                </sharesOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>D</value>
                </directOrIndirectOwnership>
            </ownershipNature>
        </nonDerivativeHolding>

    </nonDerivativeTable>

    <derivativeTable>

        <derivativeHolding>
            <securityTitle>
                <value>Warrants</value>
            </securityTitle>
            <conversionOrExercisePrice>
                <value>0.5</value>
            </conversionOrExercisePrice>
            <exerciseDate>
                <value>2002-08-23</value>
            </exerciseDate>
            <expirationDate>
                <value>2005-12-31</value>
            </expirationDate>
            <underlyingSecurity>
                <underlyingSecurityTitle>
                    <value>Common Stock</value>
                </underlyingSecurityTitle>
                <underlyingSecurityShares>
                    <value>6000000</value>
                </underlyingSecurityShares>
            </underlyingSecurity>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>6000000</value>
                </sharesOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>D</value>
                </directOrIndirectOwnership>
            </ownershipNature>
        </derivativeHolding>

        <derivativeHolding>
            <securityTitle>
                <value>Warrants</value>
            </securityTitle>
            <conversionOrExercisePrice>
                <value>0.065</value>
            </conversionOrExercisePrice>
            <exerciseDate>
                <value>2003-04-21</value>
            </exerciseDate>
            <expirationDate>
                <value>2004-12-31</value>
            </expirationDate>
            <underlyingSecurity>
                <underlyingSecurityTitle>
                    <value>Common Stock</value>
                </underlyingSecurityTitle>
                <underlyingSecurityShares>
                    <value>8900000</value>
                </underlyingSecurityShares>
            </underlyingSecurity>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>8900000</value>
                </sharesOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>D</value>
                </directOrIndirectOwnership>
            </ownershipNature>
        </derivativeHolding>

        <derivativeHolding>
            <securityTitle>
                <value>Warrants</value>
            </securityTitle>
            <conversionOrExercisePrice>
                <value>0.065</value>
            </conversionOrExercisePrice>
            <exerciseDate>
                <value>2003-04-21</value>
            </exerciseDate>
            <expirationDate>
                <value>2004-12-31</value>
            </expirationDate>
            <underlyingSecurity>
                <underlyingSecurityTitle>
                    <value>Common Stock</value>
                </underlyingSecurityTitle>
                <underlyingSecurityShares>
                    <value>12500000</value>
                </underlyingSecurityShares>
            </underlyingSecurity>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>12500000</value>
                </sharesOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>D</value>
                </directOrIndirectOwnership>
            </ownershipNature>
        </derivativeHolding>

    </derivativeTable>



    <ownerSignature>
        <signatureName>Paradigm Group II, LLC, General Partner</signatureName>
        <signatureDate>2003-08-20</signatureDate>
    </ownerSignature>
    <ownerSignature>
        <signatureName>/s/ Sheldon Drobny, Managing Member</signatureName>
        <signatureDate>2003-08-20</signatureDate>
    </ownerSignature>

</ownershipDocument>

