How to edit XML file in Note Pad
The XML file format is an interface language that is decoded to be used for Microsoft Explorer, programs and other file components’ formatting. This kind of computer interface language is very important for the software to interact with its components’ functionality in an effective manner. One can learn how to edit XML files and access them with the proper instructions. Here we are going to look at editing an already existing XML file, so we are going to assume that you are familiar with the basic processes of creating an XML File in Notepad.
Before we understand the process, let us understand the interface in brief. The interface essentially represents two panes- one is for the structure and the other is for the values. It is possible for you to add elements, comments and text to the XML document by creating what is called as a tree structure, in the left pane and entering the values on the right side of the pane.
To make this process easier, we are going to illustrate the process by breaking it down into key steps:
Opening and Accessing the Document
To open XML Notepad, click Start, go to programs and open Microsoft XML Notepad. In other cases, you can locate the ‘Run’ command that will be found in the ‘Start’ Menu. When the ‘Run’ command dialogue window comes up, enter your XML file’s name into the blank form that will be provided. Here, you will be provided with an interface showing two panes. The ‘Tree Structure’ on the left is going to show the beginning of an XML tree structure with a Root_Element and Child_Element already present.
The Editing Process
As you are editing the document, do not move any asterisks, arrows or punctuations. If you are changing the Root_Element to Catalog and the Child_Element to book, as you are adding an attribute, do not include apostrophes. Notepad will insert them for you automatically. The reason it is not recommended that you do this, is because these markings contribute to the structure of the document, just as with writing, when you add a punctuation mark to complete a sentence.
When you have finished editing the document, you can then move on to clicking on the ‘File’ Tab in the navigation pane, at the top.
Click on the ‘Save as’ option and select the source as ‘desktop’ which is going to be listed on the left-hand side panel. It is important that you save the document in a different location to avoid over-riding the existing document and this is particularly true with XML files, as over-riding is prohibited with XML.
A brief example of creating and editing an XML Document
- To insert an attribute for Book, right-click Book, Insert and then click on Attribute. You will find a cube icon, under that, type the ID. For value attribution, highlight the ID and type in the ID in the text box that comes up.
- For a child element for Book, right-click on the folder icon next to Book, point at Insert and click on the Child Element. Type Author next to this icon and type the name of the author, as desired.
- If you wish to add another Book Element, then right-click an existing Book element and click on Duplicate. Fill in the value as required.
- If you wish to add TEXT to the existing elements, highlight the node and add the text. Insert<Text.
- If you wish to add comments, then highlight the node upon which you would like to add the comments and Click on Insert<Comment.
- If you would like to change the type of the Node, then in the TOOLS menu, click to change to and select the desired type.
Taking note of a few important things
- As mentioned before, if you planning on saving a duplicate type, then save the duplicate to your desktop. Saving it under a different source and under a different name, will give it easy accessibility and allow you to edit and make changes, without any complications.
- Make note of the file’s name or at least keywords within the name. This is going to be essential while locating the file, because they are not easy to locate considering they are preserved as internal functions for all of your programs and functions.
- Under no circumstances, should you open the XML file in the existing document. This is especially important to take note, because you will not be allowed to close the document, as principally XML Files are not created to be edited.
- There are several prompts and functions that you will see in the XML Document. It is important to follow them closely, because these files are very difficult to find. In most scenarios, they can be located by their extensions such as .xml or .dll extension. You will also find a lot of XML documents that are not located as per any extension. The file extension can only be found in the document type.
- There are chances that you might not find the Notepad option by default, as you click on the ‘Open with’ option. In case that does happen, click the ‘Browse’ option within the ‘Open with’ option and you will be able to locate and access the program easily.