[jdom-interest] Problem with a "deprecation API" error.

guru at stinky.com guru at stinky.com
Sat Jun 16 08:56:11 PDT 2001


> <?xml version="1.0"?>
>     <FileSystem>
>           </C:\someText.txt>
>             <C:\dev>
>                 </C:\dev\somePic.jpg>
>             </C:\dev>
> 
>     </FileSystem>

That's not legal XML.  You can't have colons or other funky characters
in element names.  Try a format like:

<FileSystem>
  <file>c:\sometext.txt</file>
  <dir name="c:\dev">
    <file>c:\dev\somePic.jpg</file>
  </dir>
</FileSystem>

Or even better:

<dir>
 <name>c:</name>
 <file>sometext.txt</file>
 <dir>
  <name>dev</name>
  <file>somePic.jpg</file>
  <file>otherPic.jpg</file>
 </dir>
</dir>

Then your program can compute the full name by walking up the tree,
but can still have access to the solo file name.

-- 
Alex Chaffee                       mailto:alex at jguru.com
jGuru - Java News and FAQs         http://www.jguru.com/alex/
Creator of Gamelan                 http://www.gamelan.com/
Founder of Purple Technology       http://www.purpletech.com/
Curator of Stinky Art Collective   http://www.stinky.com/



More information about the jdom-interest mailing list