XPath Field in Find/Replace Dialog Disabled

Questions about XML that are not covered by the other forums should go here.
sarcanon
Posts: 39
Joined: Mon Aug 24, 2009 11:42 pm

XPath Field in Find/Replace Dialog Disabled

Post by sarcanon »

Hello.

I am editing an XML document in OxygenXML Editor 24.1 (build 2022062007) on Windows 10 Pro (x64).

When attempting to perform Find/Replace operations in my document, I am unable to enter any values into the XPath field, as it appears disabled. Similarly, the Options gear icon to the right of the XPath field is disabled.

I have observed this behavior in the past when the current document contained one or more validation errors. However, this is not the case with the current document. Immediately prior to attempting to use the Find/Replace dialog, I validated the document.

Please note the XPath field is enterable for other XML documents I have. It just seems to affect this particular document.

Might it be size-related? The document in question is ~ 33 MB in size.

Can you please tell me under what circumstances the XPath field is disabled, and how can get it to function again?

Many thanks in advance.
Radu
Posts: 9074
Joined: Fri Jul 09, 2004 5:18 pm

Re: XPath Field in Find/Replace Dialog Disabled

Post by Radu »

Hi,

From what I looked in our code (and we'll also try to document this better in the user's guide) the XPath field from the Find/Replace dialog is disabled if:

1) The edited XML document is not well-formed (which is not the case from what you said).
or:
2) The XML document is considered large by Oxygen and when opened the end user chooses to open it with the "large" or "huge" model. Meaning this dialog showed up when you opened the XML doc: https://www.oxygenxml.com/doc/versions/ ... ments.html

For (2) in the Preferences->"Editor / Open" page there is an "Optimize loading in the Text editing mode...." setting which has the default value of "30". Just try to increase that, Oxygen will consume more internal memory when opening the XML document but the XPath field should work (although computing the XPath intervals also consumes extra memory, about 3-4 times the file size on disk from what I remember).
Just in case here's advice about how to allocate more memory to Oxygen if it reports it cannot open the XML due to a lack of internal memory available to it:
https://www.oxygenxml.com/doc/versions/ ... emory.html

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
sarcanon
Posts: 39
Joined: Mon Aug 24, 2009 11:42 pm

Re: XPath Field in Find/Replace Dialog Disabled

Post by sarcanon »

Excellent. What you say makes sense and is consistent with my scenario. I did see the dialog you mentioned and chose the first option (optimize for large files). I will alter the preferences as you suggest and advise if it does not resolve the situation.

Many thanks for your prmopt reply.
- Scott
Post Reply