[jdom-interest] [Newbie] - Problem using Entity

Jakob Breivik Grimstveit jakob.grimstveit at reaktor.no
Wed May 9 01:10:52 PDT 2001

From: philip.nelson at omniresources.com
Sent: Wednesday, May 09, 2001 2:07 AM

>I cant' say that I'm exactly sure what you are trying to output but I
>tell that I have rewriting the entity api to base it on entities
defined in
>the dtd.  I have been a little bit waylaid with *real work* though.
>did you want it to look like?

>> <Folder id="0">
>>  <Folder id="185">
>> &Name;  <Folder id="195">
>> &Name;   <Item price="0.0">
>>     <Description />
>>     <UserDefined>
>> &Comment;&Title;&Bitrate;&Year;    </UserDefined>
>>    </Item>
>>    <Item price="0.0">
>>     <Description />
>>     <UserDefined>
>> &Comment;&Title;&Bitrate;&Year;    </UserDefined>
>>    </Item>
>>   </Folder>
>>  </Folder>
>> </Folder>

Well, what I sent you, is a description of what happens when printing
Entities within Elements. The "&Name;" and
"&Comment;&Title;&Bitrate;&Year;" is actually entities with names Name,
Comment, Title, Bitrate and Year. The name of the entity is printed this
way (&EntityName;), but the content withing this entity is not visible
anywhere in the XMLdoc. Just with a few lines of code, how would you
instantiate an Element and add a String content to it, for finally to be
outputted to File? Perhaps I use some wrong methods? An example had been
highly appreciated!

Just for the record: Is it a total waste to buy the book "Java and XML"
(ISBN: 0596000162, by Brett McLaughlin and Mike Loukides) when looking
for help to resolve this problem? I have seen on the jdom website that
they mention several changes to the API since the book was published -
does this apply to my problem as well, or could I find the answer to my
problems there?

In advance; thanks for any help!

- Vyrdsamt...
- Jakob Breivik Grimstveit, jakob at grimstveit.net, www.grimstveit.net
- Morvikbotn 341, 5121 Ulset, tlf: 55195667, mob: 98833857
- Applikasjonsutvikler, Reaktor AS, jakob.grimstveit at reaktor.no,

More information about the jdom-interest mailing list