package com.jxml.quick.examples.convert;
import com.jxml.quick.*;
import org.xml.sax.*;
import java.util.*;

public class A2XY extends QConverterSupport
{
	public int x;	// attribute x
	public int y;	// attribute y
	public ArrayList as=new ArrayList(); // list of "a" child elements

	/**
	 * Process a non-root element.
	 */
	public void cvt(DocumentHandler destination)
		throws SAXException
	{
		setDestination(destination);
		startElement("x");
		addIntContent(x);
		endElement("x");

		if (y!=0) // Check for default value
			addIntAttribute("v",y);
		startElement("y");
		int s=as.size();
		int i;
		for (i=0;i<s;++i)
		{
			A2XY a=(A2XY)as.get(i);
			a.cvt(destination);
		}
		endElement("y");
	}
}
