For example, suppose you wanted to associate a filename with the document containing an xml object "xobj". This could be done via the following code:
tokenSource.documentProperties().set(XmlDocumentProperties.NAME, "MyFilename.xml");
To fetch the filename later, given an xobj2 anywhere in the same document, you can write:
filename = (String)tokenSource.documentProperties().get(XmlDocumentProperties.NAME);
|
|