Page 1 of 1
Formatting of xml file.
Posted: Tue Apr 01, 2014 1:49 pm
by anmol
Hi,
i am using oxygen xml editor for Docbook. So, i have this xml with really bad formatting.
So, i used the format present in the oxygen in the Preferences tab. But i still can't get few things right.
For example:
<para>..... </para> <table>
<colspec /> <tgroup>
.
.
.
</table>
Now i want the table to automatically come to the new line on opening it in the oxygen. But isn't happening.
Regards,
Anmol
Re: Formatting of xml file.
Posted: Tue Apr 01, 2014 3:52 pm
by adrian
Hi,
To format the XML document you can either (choose the one appropriate for your use case):
- (Text mode) Manually invoke Document > Source > Format and Indent (also available in the toolbar). The XML document must be well formed for this to work
- (Author mode) In Options > Preferences, Editor > Edit modes > Author, subsection Format and Indent, set the radio button to The entire document and if you want it to be consistent with the Text mode formatting also enable the option Apply also 'Format and Indent' action as in 'Text' edit mode. The document gets formatted when you save it in Author mode.
- (All modes) Options > Preferences, Editor > Format, Format and indent the document on open. When this is enabled, the document always gets formatted at opening time. Note that this means that all XML documents are always formatted, so they will always be marked as modified (due to the formatting) after being opened.
Regards,
Adrian
Re: Formatting of xml file.
Posted: Thu Apr 03, 2014 7:41 am
by anmol
Hi adrian,
I tried the last method, which formats the documents on opening.
But still the issue that i am facing is not getting fixed.
suppose i have text like this-
<chapter> .... </chapter> <title> .. </title>
<para> ... </para> <section> ..
.
.
</section>
Now i want that on formatting <title> moves to the new line.
and <section> also moves to next line. I didn't see this result on formatting it.
Re: Formatting of xml file.
Posted: Thu Apr 03, 2014 8:29 am
by adrian
Hi,
I've tested with your XML snippets, but it formats them for me. It may depend on the larger context.
Could you please send us a full sample file to support AT oxygenxml DOT com?
Regards,
Adrian