CVS Update: xmlpull-api-v1/src/java/samples

Aleksander Andrzej Slominski <[email protected]>
Newsgroups gmane.text.xml.xmlpull.devel
Message-ID <[email protected]>
aslom       02/07/08 12:39:49

  Modified:    src/java/samples Roundtrip.java
  Log:
  modified to use factory API (so should work with any XmlSerialzier impl)
  
  Revision  Changes    Path
  1.5       +3 -2      xmlpull-api-v1/src/java/samples/Roundtrip.java
  
  Index: Roundtrip.java
  ===================================================================
  RCS file: /l/extreme/cvspub/xmlpull-api-v1/src/java/samples/Roundtrip.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -b -t -w -r1.4 -r1.5
  --- Roundtrip.java	2002/07/08 17:31:09	1.4
  +++ Roundtrip.java	2002/07/08 17:39:49	1.5
  @@ -116,8 +116,9 @@
           //for (int i = 0; i < args.length; i++)
           for (int i = 0; i < 1; i++)
           {
  -            XmlPullParser pp = XmlPullParserFactory.newInstance().newPullParser();
  -            XmlSerializer serializer = new MXSerializer();
  +            XmlPullParserFactory factory = XmlPullParserFactory.newInstance();
  +            XmlPullParser pp = factory.newPullParser();
  +            XmlSerializer serializer = factory.newSerializer();
   
               pp.setInput(new java.net.URL(args[ i ]).openStream(), null);
               serializer.setOutput( System.out, null);
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.