Search the web
Sign In
New User? Sign Up
xmlpull-user
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Real people. Real stories. See how Yahoo! Groups impacts members worldwide.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
DOM2XmlPullBuilder   Message List  
Reply | Forward Message #281 of 308 |
I'm looking into the DOM2XmlPullBuilder class and I get a NullPointerException when attempting to parse the following file:

<?xml version="1.0" encoding="UTF-8"?>
<ServerConfiguration xmlns=" http://your-namespace-here"  xmlns:xsi="http://www.w3.org/2001/XMLSchem a-instance" xsi:schemaLocation=" http://your-namespace-here test.xsd">
  <Server>savage-m60</Server>
</ServerConfiguration>


Although I can successfully parse the following:

<?xml version="1.0" encoding="UTF-8"?>
<jtc:ServerConfiguration xmlns:jtc="http://your-namespace-here" xmlns:xsi="http://www.w3.org/2001/XMLSchem a-instance " xsi:schemaLocation="http://your-namespace-here test.xsd">
  <jtc:Server>savage-m60</jtc
:Server>
</jtc:ServerConfiguration>



Is there something wrong with the first form of this instance document?


Respectfully,
Fred Burkley


The sample parse code follows.


import java.io.File;
import java.io.FileReader ;
import org.xmlpull.v1.dom2_builder.DOM2XmlPullBuilder;

public class PullParserTest {
  public static void main(String[] args) {
    File file;
    FileReader fileReader;
    DOM2XmlPullBuilder pullBuilder;

    if (args.length < 1) {
      System.out.println("Enter the name of the XML file on the command line.");
      System.exit(0);
    }
    try {
      file = new File(args[0]);
      fileReader = new FileReader(file);
      pullBuilder = new DOM2XmlPullBuilder();
      pullBuilder.parse(fileReader);
    }
    catch (Exception ex) {
      ex.printStackTrace();
    }
  }
}




Fri Oct 20, 2006 3:47 pm

fburkley
Offline Offline
Send Email Send Email

Forward
Message #281 of 308 |
Expand Messages Author Sort by Date

I'm looking into the DOM2XmlPullBuilder class and I get a NullPointerException when attempting to parse the following file: <?xml version="1.0"...
Frederick Burkley
fburkley
Offline Send Email
Oct 20, 2006
11:56 pm

hi Fred, an excellent bug report - now in bugzilla http://www.extreme.indiana.edu/bugzilla/show_bug.cgi?id=246 and it is now fixed in xpp3-1.1.4 and in CVS -...
Aleksander Slominski
as10m
Offline Send Email
Oct 23, 2006
5:19 am
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help