Tools Home : XML Tools : Find Words -- Concordance

Click here to show HTML tools HTML Tools

Click here to expand XML tools XML tools

Click here to expand plain text tools Plain Text Tools

Click here to expand other tools Other tools

 Beta tools
 Add Tools Demo

Find Words -- Concordance

This tool finds text anywhere within an XML document, either located at a specified web address or in a document uploaded from the user’s files, and generates a concordance for each instance.

Users can limit the search to text within specified XML elements or attributes and choose whether to situate their desired text within a context of words, lines or sentences. The search terms can be a word or a regular expression.

Please click the ? buttons at the bottom right of each set of options for more information on that set.

For further information on this tool, please see the TADA Wiki's Concordance entry here. A glossary of terms is also available here.

To generate a concordance for text found between <para> and </para> from, search the text for 'Microsoft', display up to 5 words found immediately before and after 'Microsoft' and display it within a new HTML page:
  1. Source text
    1. Enter ‘’ into the ‘URL’ field.
  2. Subtext limited to
    1. Enter ‘para’ in the ‘Elements’ field, leaving the 'Atribute name' and 'Attribute value' fields blank.
  3. What to find
    1. Enter 'Microsoft' in the 'Word/Pattern' field.
  4. Context for concordance
    1. Choose 'Words' from the 'Context' drop-down menu.
    2. Enter '5' into the 'Context length' field.
  5. Results
    1. Select ‘HTML’ from the ‘Display as’ drop-down menu.
    2. Check the box next to 'Display words before and after the pattern'.
  6. Click the ‘Submit’ button to process the text.
» Source text


This section determines the source of the document you wish the tool to process. XML can be obtained either from a web address or by uploading a file.


Source URL
To use content from a web page, enter a full web address (URL) ending in .html in the field provided. Copy and paste from your browser’s address bar for best results.

Local file
To upload an XML (.xml) file from your computer, choose ‘Local file,’ click ‘Browse,’ and select the file you wish to use from your directory.
» Subtext limited to

This section determines which elements to extract text from. Users can also specify the attribute name or name/value pair modifying the element.


Determines which XML elements to extract text from. Multiple tags must be separated by commas. This field cannot be left blank.

Attribute name
Use this field to specify an attribute name that modifies the element listed above. Only instances the element with this attribute will have text extracted from them.

Attribute value
Use this field to specify an attribute value modifying the element and attribute name listed above. The attribute value must be paired with an attribute name. Only instances the element with this attribute name/value pair modifying it will have text extracted from them.
» What to find

This section determines what to search for within the document.


Word/Pattern to find
Users can filter results based on the word, phrase or pattern (regular expression) entered here. To search multiple words without the tool treating them as a phrase, separate words with commas (Ex: red, orange, purple). To search for a phrase, enter it as it appears in the text - quotation marks are not needed (Ex: wine-dark sea, not "wine-dark sea"). Unix-style searching may also be used.

Get Synonyms
If searching a word, this button generates a list of synonyms in a new window. To search the original word plus synonymns, copy the comma-separated list in the text box of the new window and paste it into the Word/Pattern field. Note: Collocation only.
» Context for concordance


This section allows the user to define the context type and how many of that type to show on either side of each instance of the word or pattern. Users can either ignore XML elements or use them as part of the context.


Ignore elements
Choose this option to remove all XML elements from the results and just display the text within them.

Context can be set to one of three options from the drop menu: by words, lines, or sentences.

Context length
Enter the number of words, lines or sentences to include before and after the word/pattern.

Use elements
Choose this option to include XML elements in the results.

Closest Element
Click the radio button to show the XML element in which the text is found.

Surrounding Element
This option allows users to specify a particular XML element as the context for the word or pattern.
» Results


This section allows users to choose how the results will be formatted, and whether to display it in a new browser window.


Display as
This drop-down lists enables users to choose from several output formats: HTML, XML text in HTML, XML tree, and Tab delimited text.

Display words before and after the pattern
Check this box to display the words surrounding the pattern. Note: Concordance only.

Open results in new window
Checking this box will display the results in a new window. This option is selected by default. Some pop-up blockers may prevent a new window from being opened; if so, un-check the box to open the results in the same window instead.
`*' indicates a required field



TAPoRware Project, McMaster University,