[jdom-interest] special characters

Brian Wolf brianw at knowledgextensions.com
Thu Jun 20 16:08:42 PDT 2002

I am using jdom to read and analyze words  pulled from xml tagged paragraphs. With normal text, every thing is ok, but trips up on text like below with special characters. Is there a special way I need to handle 
these characters?

Thanks Brian

<BodyText kxid="xml-5.64">We declare a default namespace using the xmlns attribute with a URI as its value (line 6). Once this default namespace is in place, child elements that are part of this namespace do not need a namespace prefix. Element file (line 9) is in the namespace corresponding to the URI urn:deitel:textInfo. Compare this to Fig. 5.8, where we prefixed the file and description elements with the namespace prefix text (lines 9-11).   Fig. 5.9 Using default namespaces.
 1 &lt;?xml version = "1.0"?&gt;


 3 &lt;!-- Fig. 5.9 : defaultnamespace.xml --&gt;

 4 &lt;!-- Using Default Namespaces        --&gt;


 6 &lt;directory xmlns = "urn:deitel:textInfo"

 7            xmlns:image = "urn:deitel:imageInfo"&gt;


 9    &lt;file filename = "book.xml"&gt;

 10       &lt;description&gt;A book list&lt;/description&gt;

 11    &lt;/file&gt;


 13    &lt;image:file filename = "funny.jpg"&gt;

 14       &lt;image:description&gt;A funny picture&lt;/image:description&gt;

 15       &lt;image:size width = "200" height = "100"/&gt;

 16    &lt;/image:file&gt;


 18 &lt;/directory&gt;

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://jdom.org/pipermail/jdom-interest/attachments/20020620/d214e8f1/attachment.htm

More information about the jdom-interest mailing list