Adding XML Tags

Discuss the word processor
Post Reply
hrafnagud
Posts: 1
Joined: Thu Jan 24, 2008 8:28 pm

Adding XML Tags

Post by hrafnagud »

Hello,

im developing a small Java Modul who creates documents based on an open office writer document.

i want to add placeholders in form of xml-tags, eg <placeholder>this is the repeatable text</placeholder> in my odt-document. if i save this, the xml-filter of open office removes this form for some good reasons.

what is the best way to add xml-attributes into an odt-document. ive readed something about it, this elements are called as aliens, cause i dont find a way to add it into the document.

best regards
User avatar
acknak
Moderator
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Re: Adding XML Tags

Post by acknak »

I don't think there are too many xml developers or ODF wizards available. You might try dev-at-openoffice.org.

My only thought is that you should be able to extend the format (it is the eXtensible Markup Language after all), but I don't know what the best approach with something like ODF is.

You could also use the existing style tags, i.e., assign a particular style to be your tag. The style need not have any effect on the presentation, but your processor can pick them out based on the style name.

That seems a bit of a hack, but it would not require any extensions.
AOO4/LO5 • Linux • Fedora 23
User avatar
Villeroy
Volunteer
Posts: 31363
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Adding XML Tags

Post by Villeroy »

Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Post Reply