Skip to Content.
Sympa Menu

xom-interest - Re: [XOM-interest] Exception message "-1"

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: Luca Passani <passani AT eunet.no>
  • To: xom-interest AT lists.ibiblio.org
  • Subject: Re: [XOM-interest] Exception message "-1"
  • Date: Tue, 24 May 2005 20:16:32 +0200

John Cowan wrote:

Luca Passani scripsit:


http://www.virgilio.it/home/index.html


No problem running TagSoup standalone on this.


I have a subclass of NodeFactory. I want to turn this:

<div>
<a href="kk">text</a>
</div>

into:

<a href="kk">text</a><br/>

using XOM NodeFactory and finishMaking Element()

public Nodes finishMakingElement(Element element) {
:
if (element.getLocalName().equalsIgnoreCase("div") ) { :
if ( child instanceof Element &&
((Element)child).getLocalName().equalsIgnoreCase("a")) {
child.detach();
nds.append(child);
nds.append(br);
previous_tag = "br";
return nds;
}

Thanks

Luca




Archive powered by MHonArc 2.6.24.

Top of Page