Most applications default to the file format in the Save and Open dialog boxes. For example, Word 2003 defaults to the .doc file format . If you want to open a different file type than the default setting, you must open the File Of Type drop-down list, select the file type and then let Word update the list. You can shorten this step if the default setting for Word displays XML files by selecting All Word Documents in the File As Type list . After that, Word will display the XML file in the Name list box, and these settings will be saved.
Trick to create XML files in Word 2003 Picture 1
2. Save with * .xml format
By default, Word will save the file in .doc format. If you only work with XML files, you must remember to change the settings every time you save the file. However, there is a way to help you not always remember that by setting Word to automatically save documents in XML format:
Go to Tool Options menu.
Select the Save tab.
In the Save Word File As drop-down list, select the format of XML as * .xml .
Then click OK .
Trick to create XML files in Word 2003 Picture 2
3. Change properties
When opening an XML document, Word displays tags and content, and opens the XML Structure task window. But where are these attributes? To view the properties, just right-click an element and select Attributes , then the Attributes For Item dialog box will appear. To change the value, select an attribute in the Assigned Attributes list and edit the value in the Value box.
Trick to create XML files in Word 2003 Picture 3
If this element has multiple values, the dialog will not indicate the value being installed. To avoid trouble, you should pre-select the element to install then open the Attributes For Item dialog box.
4. Search for options
Word allows you to control tasks on an XML file, but it's difficult to find configuration options. You can find these options in the following way:
Go to the Tool Template And Add-Ins menu.
Select the XML Schema tab.
Click the XML Options button to open the XML Options dialog box.
Trick to create XML files in Word 2003 Picture 4
There is also a simpler way to open the XML Options dialog box, click on the XML Options link at the bottom of the XML Structure task pane. But remember that these options only work with the current document. You must reset them when opening another XML file.
Trick to create XML files in Word 2003 Picture 5
5. Easy editing
If you want to edit the current content you do not need to use the tag, because you can delete the wrong tag. To turn off tag deletion during editing, remove the Show XML Tags In The Document option in the XML Structure task pane. You only need to enter the desired value to change the value. To delete the value, you need to select all tags from the first to the last tag. If you delete a value without deleting element tags, you will create an empty element.
Or you can switch the hidden or visible tag settings by pressing Ctrl + Shift + X.
6. Display empty element
It's best to avoid creating empty elements, but there are exceptions. Although the Show XML Tags In The Document option has been selected, because of some errors the tag cannot be displayed. If you want to hide element names but still want to know when an element is empty, use a placeholder:
Go to Tools Templates And Add-Ins menu.
Select the XML Schema tab.
Select the next XML Options .
Check the Show Placeholder Text For All Empty Elements option in the AML View options list.
Then Click OK twice.
Trick to create XML files in Word 2003 Picture 6
7. Avoid losing data
The format conversion process will determine the data in the Word document. If the conversion does not match the data in the file you are open, that data is not displayed on the file. In this case, the conversion process is like filtering the data. For example, you can use the conversion to create a product list and price. Another conversion process may include product name, price and product description. Instead of opening the original file and deleting the data yourself, the conversion will automatically perform those actions if the conversion is applied when you open the original file.
To open a file that applies conversion, select Open With Transform from the drop-down list of the Open button (in the Open dialog box). You can also apply conversions when saving files: In the Save As dialog box, select the XML Document of the File As Type option, select the Apply Transform option, then click the Transform button to select the desired conversion type. use.
Remember, the conversion process not only changes the open file but also changes the original document in Word. If you save the open file, the changes are also saved to the original file. And if the conversion for fila is saved, this conversion is also saved to the original file. So to avoid losing data or changing the original file, save the converted files under a new name.
8. Download the XML Reference Schemas
If you want to use Word to write XML format code, you need to download Office 2003 XML Reference Schemas or SystemOffice 2007 : XML Schema Reference . These are help files that work with XML structure in Word. After downloading, open the .chm files in the browser to view and reference while working. If you need to share XML files with others, you should use Word 2003: XML Viewer.
9. Turn off the namespace
Sometimes element names in the XML Structure dialog box are long and meaningless because the namespace display table in the element name is installed by default.
Trick to create XML files in Word 2003 Picture 7
To remove namespaces you only need to do the following:
Click the XML Options link at the bottom of the XML Structure task pane.
In the options list, select the option Alias In XML Structure Hide Namespace .
Then click OK .
Then the XML Structure task window becomes:
Trick to create XML files in Word 2003 Picture 8
10. Anti-delete elements of XML
Maybe an XML document will have many people edit. In this case you can use an XML document feature to protect XML tags while allowing others to edit existing content. Perform the following actions:
Select the Show XML Tags In The Document option in the XML Structure task pane.
Select the Protect Document item in the Tool menu .
Select the Allow Only This Type Of Editing option In The Document in the Editing Restriction area of the Protect Document task pane.
The next option No Changes (Read Only). This is the default option installed.
In the document, select the contents of an element.
Then, select Everyone in the Exceptions section of the Protect Document task window. According to Figure I.
Repeat steps 5 and 6 with each XML tag containing the data you allow others to edit.
Then click Yes, Start Enforcing Protection .
To set a password to protect the document, you enter the password in the Password and Retype Password box ; To encrypt the document, click on User Authentication .
Done click OK .
Trick to create XML files in Word 2003 Picture 9
11. Open the XML file in Office 2007
Applications in Office 2007 also use Office Open XML Format files. These files use ZIP compression. If you want to view Word, Excel or Power Point (2007) files as XML documents, change the extensions of these files to ZIP, then open these files in Windows Explorer and you will see the following folders:
The _rels folder contains a .rels format file that stores information about the relationship between items in the ZIP package. That's the Office 2007 method of finding all the information you need when opening a document.
Folder containing the main document that stores multimedia files (images, sound, etc.) and file contents of documents. It also stores many types of elements of documents such as settings, themes, and headers.
File [Content_Types] .xml contains definition of content types.
Using the ZIP extension, you can quickly learn about the document. But you should not change the folder structure or change the file name while opening.