Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package org.openfuxml.addon.wiki.processor.ofx.emitter;
 
 
 import  org.slf4j.Logger;
 import  org.slf4j.LoggerFactory;
public class AnchorEmitter extends NestingEmitter
	final static Logger logger = LoggerFactory.getLogger(AnchorEmitter.class);
	private boolean openTag = false;
	private static final String tag = "ofx:reference";
	{
		super(ef);
	}
	public boolean localStart(XMLStreamWriter writerString htmlElementNameAttributes attsthrows XMLStreamException
	{
		String href = null;
		String name = null;
		if (htmlElementName.equals("a"))
		{
			href = atts.getValue("href");
			name = atts.getValue("name");
		}
		.debug("href: "+href);
		.debug("name: "+name);
		if (href != null)
		{
			 = true;
			writer.writeAttribute("target"href);
		}
		else {.warn("HREF==null");}
		return true;
	}
	protected boolean localEnd(XMLStreamWriter writerString htmlElementNamethrows XMLStreamException
	{
		closeTag(writer);
		return true;
	}
	private void closeTag(XMLStreamWriter writerthrows XMLStreamException
	{
		if ()
		{
			 = false;
		}
	}
	public void close() throws XMLStreamException
	{
		super.close();
	}
New to GrepCode? Check out our FAQ X