... i am not particularly good about stylesheets (do you mean XSLT or CSS?) but AFAIU you just need ot write some processing instructions (for embedded XSLT)...
... what is the exception (please *always* send exception including stack trace!)? XmlPull factory may not be able to find a factory class implementation. did...
Hey all, I'm new to pull parsers and I had a question. Is it possible to clone a pull parser? I was hoping to create a pull parser, parse part way through a...
... yes but not easily. ... you need to clone not only parser but even more important original input needs to be saved for reparsing. instead i would create a...
That's too bad that I need to record it to re-parse it, I was hoping I wouldn't have to store any of the data in memory in order to 'rewind' and begin parsing...
Why can't you just save the inputstream? As you parse, it increments the position of the stream. Make a clone of the stream, which I don't think keeps anything...
... that is true - parser keeps in memory only small buffer with few KBs of input. ... files streams already has ability to mark positions but what you really ...
... if you are parsing files you may take a different approach and do a real clone of parser object but that will require you looking into actual parser...
So if I implemented the clone operation in MXParser, you think I could do this? I would have to call super.clone() and also clone the Reader (with simply...
... it maintains tables of namespaces, attributes etc and those must be deep cloned. i started writing a sample CloneableMXParser and should be ready in few ...
Great, thanks. I admittedly (and perhaps obviously) don't have much experience implementing clone methods, but I'm reading up right now. I look forward to...
... it is not fun but doeable though ugly - read comments in code and interview with Ken Arnold to fully appreciate ugliness of cloning in Java ... ... here is...
Man, this is awesome, thanks Alek! I just got this compiled and working and it works like a charm. I did have to cast some of the cloned objects back to their...
So I'm having one slight problem using my cloned pull parser and I was wondering if someone could help. Here's what I'm doing: I'm parsing a file, and at a...
hi Nate, this is now tracked in bugzilla: http://www.extreme.indiana.edu/bugzilla/show_bug.cgi?id=177 please login to bugzilla and add files with source code...
... Perhaps for testing the safest option is to build a mock-up cloneable reader that reads the whole content of an underlying reader to a StringBuffer? cloned...
... i have put test together implementaiton based on XPP3 that uses CharArrayReader and it worked great (so great that i may make XPP3 high end class to...
... hi Nate, just write new class something like CloneableFileReader extends Reader implements Cloneable { private File ... private long filepPos;} and makes...
alek, I don't understand how I'm able to access and clone the file and filepos if I'm extending a Reader (or in my case, a FileReader). Are these private...
Nathaniel, you need to keep track of the stream position (re-implement all methods that move the stream position by calling the super method) and create a new...
Ahh, I see. I just gave this a try and it appears to be doing the job. Thank you so much for your time! I'll post the whole class once I test it. Nate...
Great, thanks Alek! I've been using your cloneable parser with great success in my new project. Do you know when your next release will be out? The sooner the...
Hi, We use the Pull parser based on XNI to parse the input stream. Pieces of the input stream are converted into DOM (based on Xerces 2.6.x) and processed ...
I run into the problem that I can't instantiate an XmlPullParserFactory. I replace: XmlPullParserFactory factory = XmlPullParserFactory.newInstance ...
I found the solution, instead of XmlPullParserFactory factory = XmlPullParserFactory.newInstance ("org.xmlpull.v1.XmlPullParserFactory", this.getClass()); I...
... hi, XmlPullParserFactory has protected constructor and cannot be instantiated. it is meant as a base class for parser specific factory. ... i think that...
I'm using kXML to build a RDF/XML serializer, and have come across some troubles as far as entity references in attributes is concerned. Due to the extreme...