Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / September 2005

Tip: Looking for answers? Try searching our database.

How to create an !ENTITY using DOM-methods?

Thread view: 
marcus.bitterlich@web.de - 21 Sep 2005 14:12 GMT
Hi!
I'd like to create the following within an XML Document:

<!DOCTYPE eka:View [ <!ENTITY popstar-organization
"http://www.athena-ip.org/popstar/organization.xml#" > ] >

How can I do this? (I constructed the XML-file by means of DOM)

Thanks in advance,
Marcus
Karl Øie - 21 Sep 2005 18:50 GMT
Don't think you can do that with DOM, entities are part of the document
type and not part of the Document Object Model. You might be able to do
this in SAX thu...

Karl Øie

> Hi!
> I'd like to create the following within an XML Document:
[quoted text clipped - 6 lines]
> Thanks in advance,
> Marcus
marcus.bitterlich@web.de - 22 Sep 2005 09:35 GMT
Thanks. I thought, since DOM creates the <xml...>- and
<!DOCTYPE...>-tags as well, it could do so for the ENTITYS which are
placed on the same "level".

??

If not, how to do this with SAX?

thanks in advance.
Marcus
Oliver Wong - 22 Sep 2005 19:29 GMT
> Thanks. I thought, since DOM creates the <xml...>- and
> <!DOCTYPE...>-tags as well, it could do so for the ENTITYS which are
[quoted text clipped - 3 lines]
>
> If not, how to do this with SAX?

   Generating XML documents with SAX is just a difficult way of generating
XML documents manually in code, IMHO. Take being said, when I Google
"generate xml sax", the first result is an tutorial on generate XML
documents using SAX. It's written in Python, bug the algorithm itself isn't
difficult to grasp.

   Frankly it's just recursive method calls, like a reverse Visitor
pattern.

   - Oliver


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.