Create and Update the DOCTYPE, and the ENTITY part in an Xml Document.
Questions about XML that are not covered by the other forums should go here.
-
- Posts: 124
- Joined: Tue May 29, 2012 5:42 pm
Create and Update the DOCTYPE, and the ENTITY part in an Xml Document.
Post by sebastienlavandier »
Hello,
I developed an Oxygen plugin with a customized view which contains a Swing Jpanel which offers some items. Those items can be add in a xml document by a drag and drop. It works very well.
But now, I must create and update the DOCTYPE, and the ENTITY part in the Xml Document.
I don't have find a solution in the doc.
How I can do that ?
Maybe an Oxygen API exist, or I must parsed the Xml Document with Jdom, Sax, ... ?
Do you have any ideas ?
Thanks in advance
Sébastien.L
I developed an Oxygen plugin with a customized view which contains a Swing Jpanel which offers some items. Those items can be add in a xml document by a drag and drop. It works very well.
But now, I must create and update the DOCTYPE, and the ENTITY part in the Xml Document.
I don't have find a solution in the doc.
How I can do that ?
Maybe an Oxygen API exist, or I must parsed the Xml Document with Jdom, Sax, ... ?
Do you have any ideas ?
Thanks in advance
Sébastien.L
-
- Posts: 9434
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Create and Update the DOCTYPE, and the ENTITY part in an Xml Document.
Hi Sébastien,
We have some API like:
which would allow you to get the DOCTYPE of the current XML file opened in the Author page.
We also have this API method which would allow you to set the DOCTYPE back to the XML:
Here's an example of how this would work:
Basically you would take the entire content from the existing DOCTYPE:
modify it to your needs and create another AuthorDocumentType object with the new content and with the same public, system IDs.
Regards,
Radu
We have some API like:
Code: Select all
ro.sync.ecss.extensions.api.AuthorDocumentController.getDoctype()
We also have this API method which would allow you to set the DOCTYPE back to the XML:
Code: Select all
ro.sync.ecss.extensions.api.AuthorDocumentController.setDoctype(AuthorDocumentType)
Code: Select all
AuthorDocumentType dt = new AuthorDocumentType(
"article", "testSystemID", "testPublicID",
"<!DOCTYPE article PUBLIC \"testPublicID\" \"testSystemID\">");
docController.setDoctype(dt);
Code: Select all
ro.sync.ecss.extensions.api.AuthorDocumentType.getContent()
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 124
- Joined: Tue May 29, 2012 5:42 pm
Re: Create and Update the DOCTYPE, and the ENTITY part in an Xml Document.
Post by sebastienlavandier »
thank you for your quick response
Bye
Bye
Return to “General XML Questions”
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service