• Post Reply 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

xml parer error

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Fatal Error] :-1:-1: Premature end of file.
[Fatal Error] :1:23: Content is not allowed in prolog.
[Fatal Error] :1:23: Content is not allowed in prolog.
[Fatal Error] :1:23: Content is not allowed in prolog.
[Fatal Error] :1:23: Content is not allowed in prolog.
[Fatal Error] :1:23: Content is not allowed in prolog.
[Fatal Error] :1:23: Content is not allowed in prolog.
[Fatal Error] :1:23: Content is not allowed in prolog.
[Fatal Error] :1:23: Content is not allowed in prolog.
[Fatal Error] :1:23: Content is not allowed in prolog.
[Fatal Error] :1:23: Content is not allowed in prolog.
[Fatal Error] :1:23: Content is not allowed in prolog.
[Fatal Error] :1:23: Content is not allowed in prolog.
[Fatal Error] :1:23: Content is not allowed in prolog.
.........................................
vidya raj: [Fatal Error] :1:27: The markup in the document preceding the root element must be well-formed.
[Fatal Error] :1:23: The markup in the document preceding the root element must be well-formed.
[Fatal Error] :1:32: XML document structures must start and end within the same entity.
[Fatal Error] :1:72: XML document structures must start and end within the same entity.



In the weblogic managed server error , we are facing this error after restarting the server. I am not able to identify which xml is giving this problem. There are 1000s of xml , is there any way to trouble shoot which xml is giving ths problem.

Thanks

vidyaraj
 
Ranch Hand
Posts: 142
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How about writing a simple DOM reader to scan all the files. It can be located very quickly

Lin
 
vidyaraj sarma
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
if you have any code to read the folder, please send the same.
thanks
vidyaraj
 
Lin Feng
Ranch Hand
Posts: 142
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think you can follow any xml parser samples to do it.

Lin
 
vidyaraj sarma
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am new to xml that why i am seeking your kind help.
if you have just paste the same.
 
Lin Feng
Ranch Hand
Posts: 142
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
using jdk 1.4 above

import javax.xml.parsers ;
import java.io.*;
public class XmlValidator
{
public static void main (String args[])
{
// suppose the argument passing the file name

try
{
DocumentBuilderFactory factory ;
DocumentBuilder builder;
factory = DocumentBuilderFactory.newInstance();
builder = factory.newDocumentBuilder();
builder.parse(new File(args[0]);
}
catch(Exception ex)
{
System.out.println("Something wrong");
ex.printStackTrace();
}
}


}
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic