I know that we normally say unit tests should be entirely self-contained with no dependency on external systems or data - those are called integration tests.
But...
I want to write a mock which provides the result of a certain method which by its nature returns quite a large amount of JSON/XML data (as a string). In this scenario can I legitimately store the data in a text file that's part of my unit test project or would this strictly speaking still be an integration test?
Yes, you can store it in a text file, and it will still be a unit test. (Though, preferably, I would suggest to put the text in the test code itself, unless you already have it in a file, or the text is really large.)
What differentiates a unit test from an integration test is not whether it touches the file system and/or other external resources. The difference that matters is whether the unit test only aims to verify the behavior/state of a single unit, or of multiple interdependent units. In the later case, you have an integration test.
So, a unit test can run code from other units or systems it depends on. But it should assume that those other units just work as expected, without validating their behavior. Another approach for unit testing is to isolate the tested unit from dependencies through mocking or faking. Both approaches are valid.