Voorkeuren voor de XML-editor definiëren

U kunt diverse voorkeuren voor de view Bron van de XML-editor instellen, zoals de inspringingsstijl, regelterugloop en contenthulp. To apply the formatting styles, right-click in the Source view for your XML document, and click Format > Document.

Voer de volgende stappen uit om XML-voorkeuren te definiëren:

  1. Click Window > Preferences and select XML > XML Files > Editor.
  2. Enter a maximum width for formatted lines in the Line width field The default value is 72.
  3. Select Split multiple attributes each on a new line to start every attribute on a new line.
  4. Select Preserve whitespace in tags with PCDATA content to prevent the editor from deleting whitespace in elements that contain parsed character data.
  5. If you want blank lines to be removed when the document is formatted, select the Clear all blank lines check box. Lege regels worden standaard bewaard in een ingedeeld document.
  6. Select Indent using tabs if you want to use tab characters (\t) as the standard formatting indentation, or, if you prefer to use spaces, select Indent using spaces.
  7. You can also specify the Indentation size which is the number of tabs or space characters used for formatting indentation.
  8. You can specify certain characters (the default command is <=) that will cause the content assist list to pop up automatically. Ensure the Automatically make suggestions check box is selected and specify the characters in the Prompt when these characters are inserted field.
  9. If you select Strict from the Suggestion strategy list, suggestions that are grammatically valid will be shown first (with bold icons) in the content assist list. Andere suggesties die wel van toepassing zijn binnen het elementbereik maar grammaticaal niet correct zijn, worden eronder afgebeeld met niet-vetgedrukte pictogrammen. The default value for this field is Strict.
  10. The Use inferred grammar in absence of DTD/Schema check box is selected by default. If this box is selected, when you have an XML file that is not associated with a DTD or XML schema, you will still be able to get content assist - the tool will infer what should come next in your file based on the existing content.
  11. Click Apply and then OK to save your changes.