[Bug 204] Should be able to tell application about unknown entities

[email protected] Thu, 26 Aug 2004 18:53:33 -0500 (EST)
Newsgroups gmane.text.xml.xmlpull.devel
Message-ID <[email protected]>
http://www.extreme.indiana.edu/bugzilla/show_bug.cgi?id=204

[email protected] changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED



------- Additional Comments From [email protected]  2004-08-26 18:53 -------
that can not work for next/nextText as it is not possible to create element text
content if entity reference is unresolved however tht is not case for nextTokem

so here is small example to demonstrate it - when you run it with XPP3 you
should get (if you use different parser impl your mileage may vary): 

parser implementation class is class org.xmlpull.mxp1.MXParserCachingStrings
name='someEntity'
text='null'

alek

import java.io.IOException;
import java.io.StringReader;
import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserException;
import org.xmlpull.v1.XmlPullParserFactory;

public class ExampleEntityRef {
    protected static final String FEATURE_XML_ROUNDTRIP =
        "http://xmlpull.org/v1/doc/features.html#xml-roundtrip";
    final static String SAMPLE_XML = "<test>&someEntity;</test>\n";
    public static void main (String args[])
        throws XmlPullParserException, IOException
    {
        XmlPullParserFactory factory = XmlPullParserFactory.newInstance(
            //System.getProperty(XmlPullParserFactory.PROPERTY_NAME), null);
            "org.xmlpull.mxp1.MXParserFactory", null);
       factory.setFeature(XmlPullParser.FEATURE_PROCESS_NAMESPACES, true);
        //factory.setFeature(FEATURE_XML_ROUNDTRIP, true);
        XmlPullParser pp = factory.newPullParser();
        System.out.println("parser implementation class is "+pp.getClass());

        pp.setInput(new StringReader(SAMPLE_XML));

        // now just parse input
        pp.nextTag();
        pp.nextToken();
        System.out.println("name='"+pp.getName()+"'");
        System.out.println("text='"+pp.getText()+"'");
        pp.nextToken();
    }

}



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.


------------------------ Yahoo! Groups Sponsor --------------------~--> 
$9.95 domain names from Yahoo!. Register anything.
http://us.click.yahoo.com/J8kdrA/y20IAA/yQLSAA/2U_rlB/TM
--------------------------------------------------------------------~-> 

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/xmlpull-dev/

<*> To unsubscribe from this group, send an email to:
    [email protected]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/