private RefType getDefaultRefType(Address fromAddr, Address toAddr, int opIndex) {
		CodeUnit srcCU = program.getListing().getCodeUnitAt(fromAddr);
		CodeUnit destCU = program.getListing().getCodeUnitAt(toAddr);

		if (srcCU instanceof Instruction && destCU instanceof Instruction) {
			Instruction srcInst = (Instruction) srcCU;
			FlowType ft = srcInst.getFlowType();
			if (ft.isCall() || ft.isJump()) {
				return ft;
			}
		}
		else if (srcCU instanceof Instruction && opIndex != CodeUnit.MNEMONIC) {
			Instruction srcInst = (Instruction) srcCU;
			return srcInst.getOperandRefType(opIndex);
		}

		return RefType.DATA;

		//CodeUnit srcCu = program.getListing().getCodeUnitAt(fromAddr);
		//CodeUnit destCu = program.getListing().getCodeUnitAt(toAddr);
		//if (srcCu instanceof Instruction) {
		//	Instruction instr = (Instruction)srcCu;
		//	
		//	// Use FlowType of instruction if reference to another instruction
		//	if (destCu instanceof Instruction) {
		//		refType = instr.getFlowType();
		//	}
		//	
		//	// Otherwise, use default operand reference type if operand specified
		//	else if (opIndex != CodeUnit.MNEMONIC){
		//		refType = instr.getOperandRefType(opIndex);
		//	}
		//}
		//return refType;
	}
XML manager for all references ("markup" for operand substitution).
Ghidra/Features/Base/src/main/java/ghidra/app/util/xml/MarkupXmlMgr.java