This week's book giveaway is in the Cloud/Virtualization forum.
We're giving away four copies of Grokking Bitcoin and have Kalle Rosenbaum on-line!
See this thread for details.
Win a copy of Grokking Bitcoin this week in the Cloud/Virtualization forum!
    Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Frits Walraven
Bartenders:
  • Carey Brown
  • salvin francis
  • Claude Moore

Problem parsing UTF-8 encoded XML file  RSS feed

 
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Report post to moderator
I have been having issues parsing files that were encoded with UTF-8. If I save the file as standard ANSI and parse it I do not have the issues.
Is there a reason this can occur?
Here is the error I am getting:

C:\Home\Java\testbed\tmp>java RFKGenerator -in 4874.xml -xsl cl_rfk.xsl -out 4874.rfk
Applying stylesheet cl_rfk.xsl...
Exception in thread "main" ; SystemID: file:///C:/Home/Java/testbed/tmp/2.209_M_
4874.xml; Line#: 1; Column#: -1
javax.xml.transform.TransformerException: Document root element is missing.
at org.apache.xalan.transformer.TransformerImpl.fatalError(Unknown Sourc
e)
at org.apache.xalan.transformer.TransformerImpl.transform(Unknown Source
)
at org.apache.xalan.transformer.TransformerImpl.transform(Unknown Source
)
at org.apache.xalan.transformer.TransformerImpl.transform(Unknown Source
)
at gov.nasa.jsc.odfxml.java.RFKGenerator.main(RFKGenerator.java:89)

As I mentioned before this only occurs if the file is encoded in UTF-8 so I am not sure if there is any extra steps needed when parsing these type of files. I am using the latest xalan parser and the xerces processor that apache provides.
If you need any other information please let me know.
thank you.
 
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Report post to moderator
I see you still haven't changed your display name after the last time I asked you to. You do realize that not complying will cause your account to be locked, don't you?
 
El Durango
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Report post to moderator
I am awaiting a reply back from a question I sent to Thomas Paul before I decide on anything, so I suggest that you inform the rest of the "Gestapo" about this and let "Tommy boy" get back to me.
Oh by the way your post was not insightful. :roll:
 
mister krabs
Posts: 13974
  • Mark post as helpful
  • send pies
  • Report post to moderator

Originally posted by El Durango:
I am awaiting a reply back from a question I sent to Thomas Paul before I decide on anything, so I suggest that you inform the rest of the "Gestapo" about this and let "Tommy boy" get back to me.
Oh by the way your post was not insightful. :roll:


"Tommy Boy" did get back to you but you chose to ignore me. Since you think that we are the gestapo I am sure you would not want to be a part of JavaRanch. So I am helping you out by closing your account.
 
Trailboss
Posts: 22924
Firefox Browser IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Report post to moderator

Originally posted by Thomas Paul:

"Tommy Boy" did get back to you but you chose to ignore me. Since you think that we are the gestapo I am sure you would not want to be a part of JavaRanch. So I am helping you out by closing your account.


 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Report post to moderator
ok ok I submit. I put in a "real" name this time, now can I have my question answered?
 
This will take every ounce of my mental strength! All for a tiny ad:
ScroogeXHTML - the small and fast RTF to HTML converter library
https://coderanch.com/t/707504/ScroogeXHTML-RTF-HTML-XHTML-converter
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!