[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 <?xml version = "1.0"?>
2
3 <!-- Fig. 5.9 : defaultnamespace.xml -->
4 <!-- Using Default Namespaces -->
5
6 <directory xmlns = "urn:deitel:textInfo"
7 xmlns:image = "urn:deitel:imageInfo">
8
9 <file filename = "book.xml">
10 <description>A book list</description>
11 </file>
12
13 <image:file filename = "funny.jpg">
14 <image:description>A funny picture</image:description>
15 <image:size width = "200" height = "100"/>
16 </image:file>
17
18 </directory>
</BodyText>
-------------- 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