firstobject XML Editor Comments

Comments about features and bugs are posted here with most recent at the top and the responses are updated as the questions are addressed in new releases of the editor. Download, screenshots and instructions are on the firstobject XML Editor page.

Nice simple tool for what I needed

Kyle Roth 28-Jan-2013

I do very little work with XML, but just got involved in a recent project to convert XML documents to the health industry standard format, HL7. The documents we are getting have no CR or LF in them which for me made it hard to work with them. I picked your editor out from a quick web search. I copied and pasted the data into the app and with two quick commands had excellent access to the data elements I needed in two nice, clean, simple interfaces, one the parsed data and the other the nicely aligned XML document. I am sure it can do much more than I will ever use it for, but it is absolutely great for what I needed.

I am glad it is useful as is -- I wanted to add a lot of features but I haven't found time over the last several years, though I always enjoy responding to questions and helping with foal scripts. - Ben

drag to select some text, the cursor jumps

Ralph Brooker 01-Nov-2011

...a small but irritating bug. Often when you drag to select some text, the cursor jumps to the first character in the whole file instead of the location where you did the mouse-down, so you end up with a huge selection. Similarly, often when you click somewhere and press ctrl-V to paste some text, it puts it at the beginning of the file. When you repeat the action, the problem usually does not happen. It seems to happen mainly when working at the beginning of lines, so maybe it has to do with the program not recognizing that the cursor is at the left margin, and thinks you want to be at the beginning of the file... If you carefully click on the very left edge of the right pane, but maybe one pixel to the right of where the pointer turns to a double headed arrow, the cursor will often go to the top of the file. Seems like it is not getting or computing the character position correctly if the mouse click is in that very narrow zone.

You have given a good description for a problem that has bugged me for a long time. I think it has something to do with the size of the "gutter" space at the left and/or going off the edge of the edit window, and I hope to get to the bottom of it for the next release.

problem with indentation preferences

Kevin Grover 08-Sep-2011

In preferences, the indentation type defaults to 0 spaces. If I change it (to any number) it reverts to zero. HOWEVER, if I set indentation type to tabs, then choose OK to exit the dialog, then when I open preferences again, the number in the spaces field is set to 1. If I select spaces and change the number, the setting presists.

The most noticeable aspect of this release is in the title bar. For brevity, the application name "foxe" is used instead of "firstobject XML editor" and the filename appears first in the title bar followed by the path. This can be a bit jarring if you are used to looking at the end of the title to find the part you want to see, but it overcomes problems with long paths in the Windows task bar.

Previously the "watch" feature was only supported with the command line -watch option. Now you can toggle Watch mode in the View menu, and specify Watch file extensions in the Preferences dialog. In Watch File mode, the document is read-only and reloaded whenever modified on disk; you can move cursor to end (Ctrl+End) to act like a "tail" utility. If you specify Watch file extensions in the Preferences dialog, e.g. *.log;*.stat, those files will come up automatically in Watch mode. As you might expect, the Watch mode option is disabled for new documents not on disk yet.

Size limit on 'num' datatype

Matthew Keene 12-Apr-2011

Is there a size limit on the 'num' datatype? I appear to be getting a numeric overflow when trying to sum financial information in an XML document. I used the 'Generate Program'->'Sum' function to sum the value of an element in the file, the actual sum of the value is [over 27000000.00], yet the generated program returns the sum as [a large negative number]. If there is a limit, is there any other data type that I can use to avoid the overflow?

Thanks for reporting this! The limit has been increased in release 2.4.2.

editor 2.4.1.416 re-release

Ben Bryant 02-Jul-2010

I mistakenly released build number 404 instead of 416 on June 12, so I've put the correct one up. Minor differences included right-click bug in tree editbox.

editor 2.4.1 edit XML in tree

Ben Bryant 12-Jun-2010

Release 2.4.1 lets you edit XML in the tree view and see the changes in the text view as you go. This is a safer way to edit XML because it will do the escaping of special characters for you.

The most noticeable change in this release of the editor is that the tree background is grayed out whenever you edit the text view. This is a visual cue to signify that the tree is out of sync with the text document to make it more self-explanatory why the behavior can be unexpected such as when you click into an element in the tree that no longer exists in the actual XML document text. But there are lots of actions that cause it to be parsed and synchronized again such as F5 Refresh and F7 Parse, or even F8 Format, File Save etc. However, when you are editing in the tree then both views remain in sync.

tree view background is grayed when you edit the text view until re-parsed

edit XML element and attribute values right in the tree view

tree customization values are green to differentiate from data values that can be edited

foal: improvements in the debugging display for CMarkup objects in file mode; the read and write file offset and the current position

output box right-click function to "Open in document window"

Redo Ctrl+Y now puts the cursor in the correct location

Undo Ctrl+Z combines consecutive typed characters on a line and will also combine consecutive backspaces on a line, and consecutive deletes on a line

editor 2.3.4 better far east char performance

Ben Bryant 11-May-2009

Release 2.3.4 has better text drawing performance which is especially noticeable when a lot of far eastern text (such as Chinese or Japanese) is in view and Windows GDI++ is on. This is a big step up from the solution started in 2.2.5. This release also completes tree customization lower level child element, minor resource string improvements, and does not display a parse error when loading non-markup text documents.

editor 2.3.3 tree hot keys

Ben Bryant 17-Apr-2009

This update of the firstobject XML editor integrates CMarkup 11.0 changes, more complete encodings including GB18030, and fuller tree view manipulation. With CMarkup 11's file read mode in FOAL scripts, you can now parse huge XML files with negligible memory usage. To try it out, go to File -> New Program, paste in the following script, modify the XML file pathname to a file you have on your machine, and hit F10 to watch as you step through the elements of the file (click on the xml variable in the watch list to see the window into the document text as you step).

expand children or expand all descendants if children already expanded

-

collapse children or collapse all descendants if children already collapsed

right arrow

expand or go to first child if already expanded

left arrow

collapse children or go to parent if no children or children already collapsed

enter

display and select corresponding location in text editor view

Ctrl+C or Ctrl+Insert

copy portion of document to the clipboard

Ctrl+X or Shift+Delete

cut node from tree and portion of document from text editor view to the clipboard

Ctrl+V or Shift+Insert

paste clipboard text into document before the selected node

Context Menu: Paste After

paste after the selected node in the tree

Delete

delete node from tree and portion of document from text editor view

Home

go to the first element

End

go to the last element or attribute visible (uncollapsed) in the tree

Page Up

go up one page

Page Down

go down one page

up arrow

go up one line

down arrow

go down one line

F4

toggle focus between tree and text editor view

editor 2.3.2 encoding, msxml 6.0, tree

Ben Bryant 29-Dec-2008

UTF-16BE (big-endian) support and a new optional encoding argument in ReadTextFile and WriteTextFile came with the integration of CMarkup 10.1. Alt+F7 validation with MSXML now loads MSXML 6.0 if it is available on the machine (otherwise it looks for 3.0, 4.0 or 5.0), which also came with CMarkupMSXML in the CMarkup release 10.1. Two tweaks in tree customization allow you to specify what to display for an element instead of its data, and to specify a wildcard item especially useful for attributes like id that can occur for any element. For example, the following line in your Tools -> Preferences Tree Customizations will cause an id and/or name attribute value to be displayed for any element in the tree that has either of them.

I am using your firstobject XML editor to read in an xml file and parse through the data and then save the data to a file. Can you tell me how I can get the name of the file that I am parsing so I can create an output file with the same name?

A very good question, and currently there is no way with FOAL to retrieve the filename of a file that is already open in the editor. I will put that on my to do list since it would be a great thing to have.

In the meantime, there is a function to get a list of files in a particular directory called EnvFindFiles, so if you have a need for processing a file or files that are in a folder you will know the filename in that case.

Here is an example script. To use it, go to File -> New Program, paste this in, modify paths and processing, press F9. For fun, afterwards I display the file list with an added attribute of the source file size(s).

As part of foxe 2.3 being portable software, I posted at portablefreeware.com and they let me know it was still leaving behind a couple of unnecessary registry settings (for MDI document type). So this was just a quick release to remove those, so foxe shouldn't be touching the registry at all now.

Release 2.2.6 has just a couple of small fixes for annoying problems where the line up gets stuck when the line above contains tab and then word-wrap, and where the small tree view won't go away and the divider is in the wrong position.

tree suggestions: edit and auto-refresh

Jeff 30-May-2008

Great tool. I just found it and I love it. It would be great if you could edit data in the tree view, though. Also, an auto-refresh would be nice so that the tree data stays up to date as you edit things in the file view.

Great suggestions.

editor Beta 2.2.5 Far East char performance

Ben Bryant 22-Feb-2008

foxe225Beta.zip 374k.

This release greatly improves performance of displaying non-ASCII characters on Windows machines with full Far East fonts installed. Technical details: under certain Windows configurations the Win32 API for determining text draw dimensions slows down dramatically; I'm guessing it is due to very large Unicode font sets (this build uses caching to minimize calls to GetTextExtentPoint32W, but a much better solution was implemented later in 2.3.4). There is also a small fix for screen position on down arrow.

Suggestion for MSXML Validate

w. jordan 30-Jan-2008

I tested FOXE on a brand new installed Windows 2003 SP2 system. I found that the Validate with MSXML function did not work. MSXML4 is not installed on the Windows 2003 and XP system by default. Is it possible to fallback to MSXML3, or try MSXML6, if MSXML4 is not on the computer? Using MSXML3 can also validate the document with a schema.

Thank you. Switching MSXML and XML Schema validation are very high on the to do list.

editor Beta 2.2.4 paste/undo in tree

Ben Bryant 26-Dec-2007

foxe224Beta.zip 372k.

This release fixes quite a number of small but significant issues related to expected functionality. Until now, if you tried to perform an Undo while in the tree view you couldn't; you had to click into or switch (F4) to the document view, even if it was to undo a Cut or Delete done from the tree view. Now Undo will work from the tree view, plus Redo and Paste too. With Paste and Paste After you can now Cut/Copy and Paste to move elements around in the document or between documents conveniently using the tree view. A New Program action was added to the File menu. Two problems were fixed when reloading a document changed outside the editor: syntax coloring and the work-wrap setting. Even more minor fixes included 1) the first find on selected text going forward whether or not the cursor was at the beginning of the selection, 2) Find dialog remembering ignore case setting, 3) double-clicking in FOAL select document dialog, and 4) hiding tree view when document not markup.

better than any of the "major" players

PC Pete 27-Nov-2007

I've just been put on to FOXE [the firstobject XML Editor] by a German user in a text editor forum where we've been asking for years to incorporate some unicode/UTF-x support, and the response has always been "too hard". Bzzzzt. They were just resoundingly proved wrong. I've been using and developing (self-relating) software since CP/M days, always learning stuff as I go. When I got to XML, I thought (like the text editor developers I mentioned) whoa, way too hard. But you've not only done it, you've done it better than any of the "major" players.

The first thing I did with FOXE on my system (Win XP x64, lots of RAM, multiterabyte disks) was open a simple MySQL XML dump (72Mb and growing) that's given complete hernias to XML Notepad 2007, IE (32 & 64) Firefox (32 & 64), Textpad, etc, etc etc. They either take more than 20 minutes to open (displaying the simplest formatting), or crash (XML Notepad especially). FOXE opened and displayed the entire db structure in less than 2 seconds, and figured out where the formatting bug was, and displayed mixed charsets (cyrillic, hebrew, greek, korean, simplified chinese, and japanese) without error or pause.

I'll look forward to see what you can fix or implement in upcoming versions. I stopped learning XML when I couldn't find an editor that worked in 2003. That's going to change. Thanks for your efforts, you have no idea how much your program is going to be thrased in the next few months here. :) Kind regards, PC PeteAudiography

There has forever been a resistance to reality among XML proponents which has caused them when faced with a file over a megabyte to say that it is not a proper use of XML. Even if larger data sets was not the original intention for XML, it is the reality now. There are other text editors better than foxe at very large files and documents, but certainly the "major" players continue to be oblivious.

please add XPath query to editor

Ashley 21-Nov-2007

Thanks for making such a simple, lightweight but very powerful xml editor, and it's free! I love how focused it is on doing a specific job and doing it well, unlike certain other expensive XML tools. A couple of really useful additions would be:

The ability to enter an XPath string and have the matching node or nodes highlighted in the tree and text editor.

Ability to highlight an element/attribute in either the tree or text editor, and generate an XPath string that will return that element/attribute (similar to "Path" but returns XPath).

Expand/Collapse all elements in the tree view.

Expand Collapse all elements below a selected element in the tree view.

Validate XML against an XML Schema

I know it's a free application so some of these may be a bit too much. However the XPath query capability by itself would make it the best editor by far, in my view.

Thanks for the suggestions. Let me discuss a little about the option of using Microsoft's XML component, MSXML. DTD Validation support was added in the firstobject XML editor using MSXML such that only those users who invoke that feature would cause MSXML to be loaded. XML Schema Validation would be added in the same way. Every feature that utilizes MSXML is subject to the document size limitations and memory usage requirements of MSXML, which is incongruent with the huge document support of this editor, but it is acceptable when the user explicitly chooses to use it. The reason I mention this is that it would be possible to add full XPath support utilizing MSXML too. CMarkup has lightweight path features constituting common navigation shortcuts, but not approaching full XPath. So there are a couple of options for path support in the editor:

Improve integration of only the CMarkup path features, absolute paths and simple predicates including attribute values (e.g. next //*[@id=678]).

Add an MSXML based XPath Query function to give full XPath support as a separate feature from the CMarkup path features, accepting MSXML's heavy footprint for that specific feature.

XML entities?

Martin Klima 28-Aug-2007

I wonder about the support for XML entities (e.g. &lt; for &gt;) in XML editor. Currently, they are displayed as literal strings, which makes them editable, but on the other hand it makes the text look messy if it contains lot of them. Would there be an option to view them as the characters they stand for (they would have different color than the actual tags)?

Thanks for the suggestion. Since it is designed as a simple text editor, a non-escaped mode might be confusing (then again it might be just what everyone is looking for, so I will keep the idea in mind). Note that values are displayed non-escaped in the tree, though I know this does not help with large data values since the tree only shows one truncated line of data. Another option if you have control over the XML format is to use CDATA Sections which makes it easier to edit and view the unescaped special characters. i.e.

A related feature on the "to do" list will allow you to edit and add values using a dialog so that these standard entities are displayed and edited as the characters they stand for, letting the editor escape the special characters when committing the data to the document.

Find Dialog Cancel Button

Thomas S. Trias 27-Aug-2007

The Cancel button is not responsive during a Find operation; either route window messages during the find or use separate threads for the UI and operations.

Yes, this is necessary in large files especially, or when there are many occurrences in Replace All. I'll add this to the list.

Now you can set a Tools Preferences option to run only one instance of the editor at a time. This means that when you click on an associated file it will open into another window within the application rather than starting a new editor. You can also use command line switches -new and -same to control how the editor opens.

Command line arguments to specify the line and offset (column) or just the offset from the beginning of the document. i.e. foxe.exe file.xml -line 6 -offset 5

Configuration (GetProfileInt etc) system overhauled in order to save settings immediately. Settings are still in Application Data\firstobject\XML Editor\settings.xml

This is freakin' great for large XML files. it absolutely buzzed through my many MB file that eviscerated Eclipsed, annihilated notepad, waylayed Word, & exterminated XMLSpy. i could not believe how fast it was...i would have been happy if it just worked, let alone worked so responsively.

editor Beta 2.1.5 num, scrollbar fixes

Ben Bryant 27-Jun-2007

foxe215Beta.zip 332k. Another incremental release just to make these fixes available. The tree view vertical scrollbar should be solid now (thanks again W. Jordan). Also, here are fixes for the num type rounding functions and additional num locale conversion functions.

editor Beta 2.1.4 num type, Find dlg

Ben Bryant 28-May-2007

foxe214Beta.zip 330k. The num type was implemented in FOAL to support numbers with decimal places. This is not a C-style floating point number as it is implemented with integer arithmetic and it recalls the number of decimal places. So if you set a num variable to 3.0 it will retain one decimal place. Also several aspects of the Find and Find/Replace dialogs were fixed/improved: bug in Find from end of document, replace to move past replaced text, edit boxes select all when they gain focus, and focus set to Close after Replace All.

Arabic Fonts

Badr 25-May-2007

Thank you for a very needed software. I was able to write in Arabic. I used UTF-16 because when I used windows-1256 I had all square shapes. I have a question: I want to use a specific Arabic font, since now I only was able to use the default Window Arabic Font (Arial). Can I use your software to choose specifically an Arabic font? Thank you.

Choose a font from the Fonts dialog in the View menu. Although you can get by with some Arabic text, the editor does not properly handle Right To Left (RTL) and bidirectional (BIDI) text (regardless of font). Some of the text will display RTL because the Windows APIs will render pieces of text correctly, but cursor movement and selection will be incorrect.

editor Beta 2.1.3 reload and foal improvements

Ben Bryant 18-May-2007

foxe213Beta.zip 345k.

sense which files have changed and offer to reload them when you switch to the editor

The reload capability bears some discussion. In practice, the main purpose of an editor feature that senses if the open files have been modified outside the editor is to prompt you when you switch back to the editor. It is very rare to be notified while in an editor that an independent process has modified a file in the background. If such a thing happens, it would require some design in terms of how to notify the user without being a nuisance, especially if it is modified multiple times. As this case is fraught with design issues, and it is rare, I have not attempted to solve it. Also, I initially looked into FindFirstChangeNotification (a feature that only goes back to Windows NT not 9x), but ended up just doing a test of the open files at the time of re-activating the editor. This avoids the complexities of background thread notification when the information is only used at activation anyway. Let me know if this solution is not adequate.

Regular Expressions

mark 14-May-2007

Great tool. The only thing I'm missing is the use of regular expressions for find and replace.

I agree! For the time being I'm using other tools for find and replace, find in files, but I do plan one day to get these essentials into this editor. Thanks for the comment.

editor Beta 2.1.2 fixes

Ben Bryant 13-Apr-2007

foxe212Beta.zip 337k. This fixes the scrollbar flashing annoyance which occured with certain line length combinations in the editor when word-wrap was off and in the tree view. Also it uses CMarkup 9.0 and has these other fixes: standard attribute path elem/@attrib instead of elem@attrib, Cancel/Close button in Replace dialog, F1lp in menubar, splitter bar memory on toggle view text, and right-click Path in document. The zip file also includes the runtest.foal program which you can open and step through (F10) with the firstobject XML Editor to see FOAL programming.

reload file + 2.1.1.182b issues

Thomas S. Trias 16-Mar-2007

Ben, I don't know whether my last post went through before my PC spontaneously rebooted itself; I hope it did - it was witty and urbane, whereas this one will be utilitarian by necessity whilst I scan my PC.1) Please use FindFirstChangeNotification or at least add a "reload file" hotkey and menu item; closing the file and then reopening it takes too much time2) You can't close the help without undocking it3) If you close the last window, the menu looks like "File View Tools F1lp"; still works, but it looks like the F1 shortcut text is getting laid on top of the Help menu4) Once you toggle the text view off, foxe forgets the previous location of the splitter bar - thus, it won't toggle it back, and the tree view and text view toggles act as if the are mutually exclusive (until you manually reposition the splitter)5) The beta did not carry across the number of spaces in my indent preferences to the new settings file
Sorry this is so terse. Keep up the good work.

Thanks again Thomas for the great feedback. Update: (1) and (2) will be implemented sometime soon, but note that for now you can close the docked help with the ESC key. (3) (4) and (5) are fixed in Beta 2.1.2 shown above.

Feedback on first use

Toni Goeller 09-Mar-2007

Excellent and lightweight! I just needed a tool to look at a HTML file in a tree view to learn how to modify it with Perl's HTML::TreeBuilder. Before finding your tool I installed two bigger packages that did not serve the purpose. Thanks a lot! Toni

Great! Your comment is much appreciated.

editor Beta 2.1.1 FOAL programming, moved settings, and international fixes

Ben Bryant 21-Feb-2007

foxe211Beta.zip 335k. Introducing FOAL! Generate, run, develop and debug programs (with C++ syntax) right in the editor. Also, configuration has been moved out of the registry into a settings.xml file in your user Application Data folder; help (F1) is now a docking window with hyperlinks instead of an XML document; the MSXML Validate hotkey has been changed to Alt+F7; and there are fixes for IME and Chinese locale tree customizations.

FOAL stands for "firstobject Access Language," giving you unprecedented ease of access to XML and HTML documents via CMarkup. In the editor, files containing FOAL programs use the filename extention .foal. Use the code generation functions in the editor (see right-click context menus) to automatically generate working programs that you can run (F9), step through (F10, F11), and modify. So far, the language is documented briefly in the editor's help (F1).

As this is a beta release, function names and other language features are subject to change. Subsequent releases will not necessarily be compatible, though changes should be minor.

To see FOAL in action, open the runtest.foal file included in the Beta zip and press F10 and keep pressing F10 to step through line by line. You can click on CMarkup variables shown in the debug bar to watch them in action too.

The settings have been moved from the registry to your user Application Data\firstobject\XML Editor\settings.xml. The settings.xml file is created based on the registry settings if available.

foxe204Beta.zip 244k. MSXML Validate is in the Tools menu or F9. You will need msxml4.dll on your machine for it to work. The editor positions the cursor at the error position indicated by MSXML. This beta release also includes a fix for character encodings in the Preferences Tree Customization and displaying path in the status bar mentioned by w. jordan. It is not Unicode but it properly handles your Chinese or Japanese locale encoding so that it is not displayed or used improperly. Also, most message strings have been moved to resource strings to aid in localization.

Unicode will not be supported in the status bar until I start compiling the application for Windows Unicode, or obtain a UTF-8 status bar control. I could use the UTF-8 CDataEdit control for the Preferences Tree Customizations editbox, but I suspect for most users proper ANSI support will be adequate. This beta fixes a bug where it was using the double-byte ANSI text from the control as if it was UTF-8 which was garble for non-ASCII.

MSXML Validate supports validation by DTD, and also provides MSXML well-formedness checking. It is a quick way to ensure the document is "good" XML. Validation by XML Schema requires extra setup not implemented yet. And other validation technologies such as Relax NG would require another component.

request option to displ column/row info

D. Kehoe 15-Aug-2006

I noted that in the Status bar, the character position is displayed. Would it be possible to display the Row/Column data?

Others have requested line numbers in the gutter or status bar. The Line/Col status is on the To Do list. There is a "Go to line" function (Ctrl+G) if you know the line number you are looking for.

2.01 enhancement is great

w. jordan 02-Aug-2006

Hello, the 2.01 enhancement's really a cool feature [see below]. However, the preferences window does not support entering Unicode characters, such as Chinese or Japanese. I hope that Unicode support can be added to this feature. And how about providing an optional Schema validation feature with MSXML? If the user installed MSXML, it will validate the document. If not, it prompts the user to install one.

Both very good suggestions. See Beta 2.0.4.

[Editor] License for business use

DK 01-Aug-2006

I notice you have Developer licenses, but the purpose of those seems to be to grant extra functionality. I am wondering - what sort of license does one require to use this product in a business setting, and how much does it cost? I am not interested in the extra functionality - I like this program because it is small and fast and allows me to edit files with little fuss.

The license as pertains to the editor is not for extra functionality, it is for the source code. The firstobject XML Editor as an executable utility is FREE to anyone. Just download it (the latest version is foxe203Beta.zip, see below) and use it, free, period. The Advanced CMarkup Developer is for C++ MFC developers who want to use the software components and/or modify the utilities for their own internal purposes.

File->

Eugene Kaganovich 28-Jul-2006

Ben, Could you also please make File->Open dialog open the directory of the file opened in the current window.

editor Beta 2.0.3 "Go to line"

Ben Bryant 13-May-2006

foxe203Beta.zip 243k. "Go to line" in the Edit menu or Ctrl+G. (Make sure you get build 2.0.3.123 in the Help About dialog; 122 was posted for a couple of minutes with a small bug).

file reloading

Eugene Kaganovich 11-May-2006

Oh, I forgot, one more request: an easy way to reload a file. Ideally, also monitoring for changes by another process, with a prompt for reloading if it's been changed.

Update: Reload prompt is implemented since Beta 2.1.3.

XML Editor enhancement requests

Eugene Kaganovich 11-May-2006

I want to thank you for making available the firstobject XML Editor. It's a great tool with some great features that set it apart from the rest. And the price can't be beaten! I have a couple of little requests/suggestions that I believe would greately enhance the usability of this tool:

Go To Line. This is very important for debugging XML code like ant files.

replace-all functionality should be modified (or have an option) to replace only within a selected region if there is a selection.

I would suggest having a toolbar in addition to the menubar with for commonly used operations, but that's just cosmetic.

in the navigation tree, you may want to consider displaying some of the attributes (which ones should be configurable by the user) inline with the element name. When working with Ant files, target (name=compile) is much more usable for quick navigation than having to expand "target". Although "Expand children" per (4) would help somewhat.

I think your 5th item is already supported in the beta except it does not display the attrib= part. You set the particular attributes you would like to "promote" to be displayed with the element name in the Tools Preferences dialog. The other points are good and may be implemented rather quickly (except the 3rd). Grab the latest beta below.

Update: Go To Line (Ctrl+G) is available since Beta 2.0.3.

Parsing an HTML file

Murali Mohan 05-May-2006

Hi, the editor is failing to parse the following html code...

<html><body><script type="text/vbscript">
set xmlDoc=CreateObject("Microsoft.XMLDOM")
xmlDoc.async="false"
xmlDoc.load("books.xml")
set nodes=xmlDoc.selectNodes("/bookstore/book")
for each x in nodes
document.write("<xmp>")
document.write(x.xml)
document.write("</xmp>")
next
</script></body></html>

It is considering the xml tag within quotes as a potential xml tag

This is the trade-off with generic parsing that does not do anything special for a specific kind of markup. The result will be even worse with a single less than sign that can often appear in a script. It would be possible to specifically recognize HTML by the pattern of tags and/or the filename extension and this may be implemented at some point.

You can use a comment around the VBScript to avoid this situation. See the HTML specification 18.3.2 Hiding script data from user agents where it says "JavaScript, VBScript, and Tcl allow the script statements to be enclosed in an SGML comment." In the XHTML specification 4.8. Script and Style elements a CDATA Section is recommended. Here is how the syntax highlighting looks when you use a comment:

<html><body><script type="text/vbscript"><!--
set xmlDoc=CreateObject("Microsoft.XMLDOM")
xmlDoc.async="false"
xmlDoc.load("books.xml")
set nodes=xmlDoc.selectNodes("/bookstore/book")
for each x in nodes
document.write("<xmp>")
document.write(x.xml)
document.write("</xmp>")
next
' --></script></body></html>

Drop-down list in Find?

Thomas S. Trias 27-Apr-2006

There used to be a drop-down list in version 1.7 for the Find and Find and Replace dialogs with the most recent searches used. What happened to them?

Good observation. I got rid of it when I replaced it with a UTF-8 edit control for which I did not have a listbox. I neglected to mention that in the release notes item "Find/Replace dialog now has Unicode edit box and message boxes." This is due in part to the Windows-95 compatibility. A limitation I am going to cast off one of these days.

editor Beta 2.0.2

Ben Bryant 25-Mar-2006

foxe202Beta.zip 242k. Expand item no longer clears that item's tree customization. Fixed tree behavior of left and right arrows and + and - keys.

Tree navigation keys

Alex Polyakov 24-Mar-2006

Some common tree navigation keys don't work with XML tree:

Gray "+" and "-" to expand/collapse the node.

Gray "*" to expand all nodes.

Left arrow doesn't move left (uplevel), but only collapses the node.

Home, End, PageUp, PageDown don't work at all.

I prefer to use the keyboard and mostly ignore the mouse. Arrow keys are MUCH quicker than clumsy mouse hunting.

It also will be very convenient to show the tree as a GRID with expandable/collapsible nodes, like that:

Thanks for your suggestions. Number 1 and 3 of the tree hot key suggestions are fixed in beta 2.0.2, and the others will be implemented in an upcoming release. The "grid" like behavior is something to consider.

Hide attributes in tree (optionally)

Alex Polyakov 24-Mar-2006

Your XML editor is very nice and very powerful! Tree customization is really great! I used it to edit tree-structured files like sitemap or table of contents. A possible TOC format looks like that (modified from xmlsdk40.chm):

However, when I expand the <li>
node, the title drops down to next line. It's very inconvenient to the eyes (try it yourself with this XML snippet). You don't always need to see ALL the attributes, just SOME of them. Could you please add an option to HIDE attributes in the tree, or setup a filter of what attributes to show? Or maybe show all attributes on a single line after the node: title="DOM Developer's Guide" href="..."

When the element is opened (expanded) in the tree, the customization text that was next to it is cleared. The original idea was that since it is now likely visible in the items below, it is no longer useful at the top. But after using it for awhile I am convinced this was wrong and it is fixed in beta 2.0.2. Let's see if that solves some of the inconvenience you described, and we'll continue to think about your suggestions for tree customization features for attributes.

editor Beta 2.0.1

Ben Bryant 19-Feb-2006

foxe201Beta.zip 242k -- this REALLY makes the tree view handy!

The full release process is too time consuming to allow rapid releases so a "Beta" version and notes are available here. The Beta is simply a newer version without some of the testing and source code preparation involved in the latest official product release on the firstobject XML Editor page.

When I try to input polish letters I get (eg \aogon using Latex notation): UTF-8 is C2 B9 Unicode hex B9 (195) Latin-1 Supplement 0080 - 00FF (31 in windows 1250). And polish characters display as black square or Latin 1 characters with the same ASCII codes as Polish ones. I use Windows XP, selected font has Central European Script. For \zacute and \oacute input works fine.Could you put row and column number somewhere in visible place? Offset from the beginning is rather not useful.

The Polish keyboard problem was simply a bug that has been fixed in the firstobject XML Editor 2.0.

Your point about the offset from the beginning is well taken. Others have mentioned the need for line numbers (if not in the gutter then in the status bar) and you are helping to raise the priority. As I said earlier, due to the implementation it is not trivial though.

Entering foreign characters in the editor

Richard C 26-Jan-2006

Great product for the price! However if I enable arabic or hebrew IMEs although I can type into notepad and paste the resulting (relevant language) text into firstobject file correctly, actually typing using the IME puts in 8859-1 characters incorrectly. It says it works with chinese... I have tried both in unicode and in arabic windows with arial and lucida unicode fonts....

This question ended up illuminating two different issues. There was a multi-language IME issue which has been fixed (see below), but the specific problem described by Richard is a limitation. The Windows OSK (On-Screen Keyboard) is accessed from Start -> All Programs -> Accessories -> Accessibility, and is not an IME program. The problem is that the OSK does not always communicate with "non-Unicode" programs in the system default code page. Though the firstobject editor uses Unicode strings, they are UTF-8 rather than UCS-2 or UTF-16 "wide character" and therefore it is not classified as a Windows Unicode program. When you use the Windows Language bar to switch the OSK layout, the code page of the OSK changes and it does not convert back to the system default code page when it forwards the keystrokes to the program, and this results in the mismatched character set garble he described. However, the OSK will work fine in any language with the firstobject editor as long as you reboot with the corresponding language for non-Unicode programs in the Control Panel Regional Settings.

However, with IME the firstobject XML Editor 2.0 works even if you switch languages. Windows comes with IME capabilites for far eastern language input including "IME Pads" which are on-screen keyboards, as well as mechanisms that appear inside of edit windows. As with the OSK, you can use the Windows Language bar to switch IME languages, but in the case of IME the Unicode text can be accessed on Windows NT-based machines (Windows NT 4.0, Windows 2000, and Windows XP and forward), so the firstobject XML Editor is able to support this.

XML Editor improvment

gibru 05-Dec-2005

XML Editor is great. For perfection can you add line numbering and the diplay of comments in tree view.

crash/hang in editor Find

larry andrews 15-Nov-2005

I pasted the xml of the Code Project Lounge into the editor. When I search for the string "xsd" it crashes. If I paste instead a little garbage text from the home line on the keyboard, it hangs.

Yes there was a bug in search that whenever your cursor was at the end of the document and you did a Find (Ctrl+F), the search dialog hanged regardless of what you entered or what your document contained. This is fixed in release 2.0.

editor Copy/Paste

C. Linn 26-Oct-2005

It would be convenient to have Cut/Copy/Paste functions on the right-click context menu.

Good suggestion. This is implemented in release 2.0.

editor Refresh

b2bwise 21-Sep-2005

It would be nice if when the focus is in the tree view, an element is selected and refresh is selected (F5) that the text view would highlight the corresponding text. It works well in reverse (highlight the test and it takes you right to the location in the tree).

Thanks for your feedback. Did you know you can press Enter while on a tree item or double-click a tree item to highlight the corresponding text in the editor? Using the keyboard to move around the tree is pretty convenient now with Right-Arrow to expand, and even the Del key works. I can see what you mean that it might be intuitive for F5 (Refresh) to work in the opposite direction when you are in the tree, but since F5 also re-parses the document if modified, it can jump you around in the tree the first time depending on modifications in the document so it might not end up simplifying the user experience.

Regular Expression Search and Replace

Thomas S. Trias 16-Sep-2005

I know this is non-trivial, but I would like a regular expression search and replace. With this and the ability to go to a line, I can stop using the Visual Studio editor entirely for XML.

Update: Go To Line (Ctrl+G) is available since Beta 2.0.3

Printing in BW

Thomas S. Trias 31-Aug-2005

How about an option to print in black and white (maybe use italics and / or bold instead of color)?

Indent / Align Selection, Tab Selection

Thomas S. Trias 13-Jul-2005

It would be nice if you could apply the align or indent just to the current selection (if applicable). I work around this now by pasting into a new document, performing the operation, and pasting back. I do this frequently for XSL files, where I am indenting the XSL tags at one level and the output at another.

I would definitely use the Go To Line feature, especially when I encounter a parse / indent error. It would also be nice if the indent would indent as much as it can up to the error; after all, you can always undo.

It would be nice if pressing tab / shift-tab would indent / outdent a multi-line selection, instead of replacing the whole selection with a tab.

As you suggested, in release 1.6 the indenting (formatting) works on the parts of the document that parse correctly. Also formatting leaves the selection where you are in the document when you format (which is a big usability improvement), and tab indent and unindent are implemented in release 1.6 too. Thanks for the good suggestions.

Update: Go To Line (Ctrl+G) is available since Beta 2.0.3.

Can I download the source code?

Fred 10-Jul-2005

I would like to integrate firstobject into my multi-language editor in Windows dot net application. Is firstobject an open source project? Where can I download the source code for it?

Often I have to read XML files of others instead of writing my own. If I navigate in the left panel, switch to another application, then come back, the focus always goes to the right panel. It would be nice that
- the focus remains where it was
- there is a keyboard accelerator so that I can switch between the panels quickly.

Great! These are in release 1.6. Use F4 to toggle between panels.

line numbering

Sarah 07-Jun-2005

I have enjoyed using this XML editor, however, it would be even more useful if you included a feature to display line numbers and provided a way to jump to a specific line (similar to the Edit > Go To... feature in Notepad). Just a suggestion!

A lot of users have suggested line numbers. The way the CDataEdit Class is implemented to be very fast on large files makes it more of a challenge than in other edit control implementations, but I've designed a way to do line numbers and hope to get it into one of the upcoming releases.

Update: Go To Line (Ctrl+G) is available since Beta 2.0.3.

XML editor enhancements and bugs

Aaron Paul 12-May-2005

Hi, been enjoying the use of your XML editor. Found a couple things in it that could be improved. 1) Word Wrap option is not persisted across program re-start. 2) If Word Wrap is turned off and a line extends past the edge of the screen, then 'End' key does not move the cursor to the end of the line. It just move the cursor to the last character at the edge of the screen. 3) It would be nice if Attribute names and values had their own colors so they would be more visibly different from Element names and Text. 4) I use the 'Indent' feature a lot ? its very useful. Would be great if it had its own Function key for quick usage.

The non-word-wrap End key, autoscroll, word wrap preference, and indent hot key F8 have been fixed/implemented in release 1.6. The attribute value color has not been changed yet (feel free to make color suggestions), and may be made configurable in an upcoming release.

show thefull path

Ronald Fischer 15-Dec-2004

The XML Editor is great, and especially great is the fact that it is free :-) It would be great if the window title would show the full path of the XML file, not only the file name. When one uses the editor, say, to edit Ant build files, you often end up having several files of the same name, build.xml, in different directories, and if you have two of them open in different windows, and the window title says only "build.xml", it is easy to mix them up.

This has been implemented in release 1.6 and also an asterisk indicates a document modified since it was loaded or saved.