Wolfgang,

I've upgraded dom4j to use the latest XPP2 version.
If you want to try it out, check out the DOM4J_1_X_BRANCH branch from CVS, or you can wait for the new 1.6.1 release next week.


thanks!
Maarten

Wolfgang Baer wrote:

Hi all,

in the process of packaging dom4j for the debian project I found
that you rely on a rather outdated version of the XmlPullParser
Version 2.

Using the recent release (2.1.10) one gets compile errors in the
org/dom4j/xpp/ProxyXmlStartTag.java class due to API changes in the
2.1.9 release of XPP2. Relevant section from changelog:

* fixed typo in method XmlStartTag.removeAtttributes -> removeAttributes
* added to XmlStartTag two new methods: removeAttributeByName(String uri, String localName) and removeAttributeByRawName(String rawName)


Please update to the current XPP2 version in your next release !

Attached a (maybe wrong) implementation of the second change. The
first should be obvious :-) But be aware I am not a XML guru and
it may be wrong (don't know the exact meaning of rawname).

Please CC me on comments or changes to these two methods, as I am
not subscribed.

Thanks,

Wolfgang

public boolean removeAttributeByName(String namespaceURI, String localName) throws XmlPullParserException {
if (element != null) {
QName qname = QName.get(localName, namespaceURI);
Attribute attribute = element.attribute(qname);
return element.remove(attribute);
}
return false;
}


public boolean removeAttributeByRawName(String rawName)
  throws XmlPullParserException {
  if (element != null) {
    Attribute attribute =  element.attribute(rawName);
    return element.remove(attribute);
  }
  return false;
}


------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ dom4j-dev mailing list dom4j-dev@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dom4j-dev






-------------------------------------------------------
This SF.Net email is sponsored by Oracle Space Sweepstakes
Want to be the first software developer in space?
Enter now for the Oracle Space Sweepstakes!
http://ads.osdn.com/?ad_id=7393&alloc_id=16281&op=click
_______________________________________________
dom4j-dev mailing list
dom4j-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dom4j-dev

Reply via email to